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.

Replies are listed 'Best First'.
Re^3: Perl oddities (s/// doesn't DWIM in map)
by dragonchild (Archbishop) on Mar 01, 2005 at 18:33 UTC
    Because that might be part of a much larger chain.

    Additionally, what's gratuitous in one set of eyes is natural in another's. For example, I find Java to be a gratuitous (mis)use of classes, but others, like Smalltalkers, find it to be gratuitously procedural. :-)

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.