You're playing on words now. The original point is you cannot leave an eval with last. Otherwise this should work:
for (1..100) { eval { if ($_ % 2 == 0) { last; } print $_, "\n"; }; }
and expect it to print only odd numbers.
--In reply to Re^6: Ways to control a map() operation
by Leviathan
in thread Ways to control a map() operation
by Booger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |