Ok, but why works the following:
$ perl -le'do { print $i++; last if $i>5 } for (1..10); print "end"' 0 1 2 3 4 5 end
In reply to Re^2: last in do vs last in while/for
by zwon
in thread last in do vs last in while/for
by dgaramond2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |