in reply to Re: how could I use map here?
in thread how could I use map here?
I stay away from using the above technique using .* as a "get everything" pattern. That is mostly because the /s is almost always forgotten. I tend to forget it less nowadays, but even though I manically think about it when I read other's code I sometimes miss it in my own code.
In your code above it leads to an undef entry for every value that has a newline somewhere after "chop_me_off" and before the last char in the string. And then again we have the max limit for quantifiers. See perl -Mre=debug -wle '"a" =~ /a*/'.
ihb
|
|---|