At 9:45 am -0500 18/1/01, Chris Nandor wrote:

|       for (keys %macToLatin1plus) {
|               $macToLatin1plus{chr $_} = $macToLatin1plus{$_};
|               delete $macToLatin1plus{$_};}
...
|       s/([\x80-\xFF])/$1$macToLatin1plus{$1}/g;
|   
|   No need for the ord() each time.
|   
|   Does it matter?  Well, it is a bit easier to call, and if there will be a
|   lot of iterations (into the thousands), it will be faster.

Yes, that's terrific.  The files in question can reach 100OK, so speed is important.  
The script is now incorporated into a menu script for BBEdit and Tex-Edit Plus/Style 
and works like a charm converting large files and doing multiple user-defined RegEx 
replacements all at once in a flash.

Thanks,

JD




Reply via email to