We don't bite newbies here... much | |
PerlMonks |
Re^3: In search of an efficient query abstractorby Corion (Patriarch) |
on Dec 07, 2008 at 20:50 UTC ( [id://728786]=note: print w/replies, xml ) | Need Help?? |
At least for the last case, Perl has an optimized version:
and it should be faster or at least as fast as the s/// version. Another version to try would be s/\s+/ /g - there is no need to use the counting variant of {2,}, and skipping might be slower than just writing the output "replacement".
In Section
Seekers of Perl Wisdom
|
|