I think this avoids your problem.sub trim { my (@out) = @_; foreach (@out) { s/^\s+//; s/\s+$//; } return wantarray ? @out : $out[0]; }
In reply to Re: Is silent use of $_ for empty argument lists reasonable for "shortcut" functions?
by enemyofthestate
in thread Is silent use of $_ for empty argument lists reasonable for "shortcut" functions?
by Wyrdweaver
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |