In question 1, your code doesn't even need a $foo.While I agree with your sentiment regarding the more perlish for loop, you have slightly changed the semantics by placing the call to getValue() within the parameter list of codethatUsesFoo(). The orginal code had getValue in scalar context, while yours has it in list context. This may or may not make a difference in reality, but it's always important to be aware of such subtlties IMHO.codethatUsesFoo (getValue()) for 1 .. $a_huge_value;
In reply to Re: Re: Two Questions on "my"
by duff
in thread Two Questions on "my"
by C_T
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |