Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Word replace - notetab light vs perlby Courage (Parson) |
on Oct 06, 2005 at 14:41 UTC ( [id://497946]=note: print w/replies, xml ) | Need Help?? |
Your code could still be optimized to run two magnitudes faster.
If you'll match/replace entire contents as a string with a single s///g expression, instead of your "while" construct, you'll see dramatic speed increase. You'll be surprised many times to see how fast Perl sometimes is....
Best regards,
In Section
Meditations
|
|