![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^4: do until loopsby Athanasius (Archbishop) |
on Feb 17, 2014 at 14:25 UTC ( #1075177=note: print w/replies, xml ) | Need Help?? |
From last: last cannot be used to exit a block that returns a value such as eval {}, sub {}, or do {}, and should not be used to exit a grep() or map() operation. So, last doesn’t work in a do { ... } until (...); loop. But — put the whole construct inside a block, and last now works fine:
Output:
Hope that helps,
In Section
Tutorials
|
|