I never thought about these side effects and I'm glad I looked into this node. Each time I'm here I learn something new & valuable. Thanks to all of you!
But to say something in regards to the code example: Now that I know of the problems using this kind of trimming in map, what do you think about this alternative?
my @files = map { /^\s*(\S.*?)\s*$/ && $1 || "" } <$FILES>;
In reply to Re: PerlCritic, $_ and map
by Skeeve
in thread PerlCritic, $_ and map
by chexmix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |