in reply to advice on improving performance of this code

This is more of a question than a recommendation: would using "tr" instead of the regex substitution in the first block would be more efficient?

PCS
  • Comment on Re: advice on improving performance of this code

Replies are listed 'Best First'.
Re^2: advice on improving performance of this code
by diotalevi (Canon) on Jan 03, 2003 at 22:50 UTC

    Yes, but then you have to replace the '\s' with the equivalent escapes something like tr/\t\r\f\n //d to match all of what \s means. (assuming no locales or unicode)


    Fun Fun Fun in the Fluffy Chair