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

Re: A Functional Substitute

by kappa (Chaplain)
on Aug 12, 2005 at 16:44 UTC ( [id://483336]=note: print w/replies, xml ) Need Help??


in reply to A Functional Substitute

The main (and very bold) argument for the substitution being an side-effect operator is the need to know whether it succeeded. You often need to do this:
s/^($timestamp_re)/decode($1)/e or die "Oh wait, looks like your log i +s garbled!\n";
...or this:
s/11 Aug/10 Aug/g and ++$count;
How will you know if your substitution function found anything to substitute?
--kap

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-19 18:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found