Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 imbibing at the Monastery: (9)
As of 2015-07-30 07:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls