http://www.perlmonks.org?node_id=435545


in reply to Re: Perl oddities (s/// doesn't DWIM in map)
in thread Perl oddities

I understand that you were just giving an example, but it looks like gratuitous chaining to me. Why not just
for (@w) { s/er/aler/g; print "$_\n"; }
You might also be interested in Algorithm::Loops 'filter'.

Caution: Contents may have been coded under pressure.