Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Perl oddities (s/// doesn't DWIM in map)

by Roy Johnson (Monsignor)
on Mar 01, 2005 at 18:03 UTC ( [id://435545]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://435545]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 18:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found