Nice observation. Usually 'good post' type posts aren't presented here, but you had a good eye to suit the OP with what they were specifically asking.
Short-circuiting definitely works better than iteration and removal (in the specific case presented).
-stevieb
In reply to Re^5: Perl modifying output of an array to remove blank lines
by stevieb
in thread Perl modifying output of an array to remove blank lines
by namelessjoe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |