In this code, the inc function uses the global keyword to access the $a variable declared at the top level. When it sets $a, ...
and most outcomes are a function of interactions, not just main effects. You can determine the main effects, interactions, ...