go ahead... be a heretic | |
PerlMonks |
Re: Code review: function to trim whitespace from all items in a listby McA (Priest) |
on Nov 21, 2014 at 09:41 UTC ( [id://1107983]=note: print w/replies, xml ) | Need Help?? |
Hi, to emphasis the two aspects of the function you could do a grep (removing totally empty list elements) with a map (removing leading and trailing whitespace). UPDATE: Taste is hardly debatable, but performance often not:
McA
In Section
Seekers of Perl Wisdom
|
|