in reply to Re^35: Side-effects are bad form [was: Why is the execution order...]
in thread Why is the execution order of subexpressions undefined?

OK, for all pedants out there, here's a slight modification:
Avoid side-effects if at all possible. If you absolutely have to use them, make sure you try as hard as you can to have them act in as limited scope as possible.
Your example is perfect. Why in the world should f interact or depend on g or h? They shouldn't! It is a sign of poor programming if they did. BTW, I (heart) Perl, but God help any unfortunate soul who's life would depend on the correct functioning of a Perl program.