Unfortunately, unlike C, Perl has to contend with something a little crazier: Tied hashes and arrays.
And function calls. In
any of y, z, or a can be methods, with or without side-effects, and with no guarantee that they'll return the same thing on subsequent calls. In the face of such flexibility, static analysis optimizations are non-starters.t = x->y->z->a->b[5];
In reply to Re: Perl and common subexpressions
by dws
in thread Perl and common subexpressions
by Stevie-O
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |