There's more than one way to do things | |
PerlMonks |
Re: Improve processing time for string substitutionsby liverpole (Monsignor) |
on Apr 16, 2007 at 13:47 UTC ( [id://610352]=note: print w/replies, xml ) | Need Help?? |
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$..$/
In Section
Seekers of Perl Wisdom
|
|