Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Improve processing time for string substitutions

by liverpole (Monsignor)
on Apr 16, 2007 at 13:47 UTC ( [id://610352]=note: print w/replies, xml ) Need Help??


in reply to Improve processing time for string substitutions

Hi valvanp,

Do the contents of the file have to be in one $string?

If you can read the lines of the file into an array instead, it should take less processing time, as the regex won't have to scan (and modify) one huge, single line each time.


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-20 02:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found