At 14:02 +0000 01.18.2001, John Delacour wrote:
>s~([\x80-\xFF])~$1$macToLatin1plus{ord($1)}~g;

Just my 2 cents:

You could do this:

        for (keys %macToLatin1plus) {
                $macToLatin1plus{chr $_} = $macToLatin1plus{$_};
                delete $macToLatin1plus{$_};
        }

Then you can do:

        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.

-- 
Chris Nandor                      [EMAIL PROTECTED]    http://pudge.net/
Open Source Development Network    [EMAIL PROTECTED]     http://osdn.com/

Reply via email to