The short cuting of the ||= is throwing you off. The right hand side doesn't get evaluated if $first is defined.
Prints as expected. cog beat me to it, thats what i get for not refreshing the node before replying. ;)for (1..10) { $last = $_; $first ||= $last; } print "$first..$last\n";
In reply to Re: what does this print?
by eric256
in thread what does this print?
by fergal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |