in reply to Global array afftected by map inside of a subroutine
Are you using Perl 5.14? If so, what happens when you use the non-destructive replacement flag /r on the regex?
Remember that because map operates on $_, it can update array elements in place. Remember also that map returns the return value of its last expression, which is not always $_.
Improve your skills with Modern Perl: the free book.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Global array afftected by map inside of a subroutine
by Lady_Aleena (Priest) on Dec 13, 2011 at 22:40 UTC | |
by chromatic (Archbishop) on Dec 13, 2011 at 23:02 UTC | |
by runrig (Abbot) on Dec 14, 2011 at 00:16 UTC |