Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

or just wait for perl 6

by jkahn (Friar)
on Aug 24, 2003 at 05:13 UTC ( #286145=note: print w/ replies, xml ) Need Help??


in reply to multiple (different) substitutions on same $foo

According to Apocalypse 4, which reads:

Basically, the only difference between a given and a for is that a given takes a scalar expression, while a for takes a pre-flattened list and iterates over it.
given $foo { s/frog/toad/g; s/man/boy/; s/woman/girl; }

Hurry up, Larry!


Comment on or just wait for perl 6
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2014-04-25 09:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (586 votes), past polls