good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^3: Perl oddities (s/// doesn't DWIM in map)by ikegami (Patriarch) |
on Mar 01, 2005 at 22:59 UTC ( [id://435646]=note: print w/replies, xml ) | Need Help?? |
my @new = map { local $_ = $_; s/foo/bar/; $_ } @old; also avoids the problem. Probably faster than using two maps, too. Still ugly, unfortunately.
In Section
Meditations
|
|