in reply to Easiest way to do something only on first iteration of loop
see perldoc -f last or use Super Search.
Update: Didn't think this one through carefully enough. last, next, continue have their excellent uses, but using last is the wrong choice in that family for use in a sub handling the indenting and using next to exit the sub I envisioned provokes perl to add a message in the middle of the output:
Exiting subroutine via next at D:\_Perl_\PMonks\1162396.pl line 31.
Please do not upvote this half-baked suggestion.
|
|---|