Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: replace / with \ using regular expressions?

by Juerd (Abbot)
on Jun 21, 2009 at 23:09 UTC ( #773427=note: print w/ replies, xml ) Need Help??


in reply to Re: replace / with \ using regular expressions?
in thread replace / with \ using regular expressions?

You need the tr/// operator

No, you don't need it. TIMTOWTDI, and s///g is as understandable and easy to write just like tr///.

The difference in performance is impressive

But typically completely irrelevant for the performance of scripts/programs of any size. This optimization feels pretty immature.

When will doing 287356 of these operations per second ever be anything other than fast enough?


Comment on Re^2: replace / with \ using regular expressions?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2015-07-03 18:48 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 (55 votes), past polls