Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^2: Special Characters list

by ZWcarp (Beadle)
on Jun 15, 2011 at 22:38 UTC ( #909871=note: print w/ replies, xml ) Need Help??

in reply to Re: Special Characters list
in thread how to remove

Ok I looked up the code...but the following doesn't seem to be working

perl -i -pe 'tr/\xe9/FIX/d' test.txt


perl -i -pe 'tr/\00233/FIX/d' test.txt

What am I doing wrong? Thanks so much for the help you guys are great

Comment on Re^2: Special Characters list
Select or Download Code
Replies are listed 'Best First'.
Re^3: Special Characters list
by ikegami (Pope) on Jun 15, 2011 at 23:06 UTC

    tr/\xe9/FIX/d is the same as tr/\xE9/F/ and convert chr(0xE9) to "F".

    tr/\00233/FIX/d is the same as tr/3\002/IF/ and converts chr(002) to "F" and "3" to "I".

    What am I doing wrong?

    What are you trying to do?

    You previously alluded that you wanted to remove "é" characters that were encoded as E9.

    perl -i -pe 'tr/\xE9//d'

    But the "FIX" in the new code seems to indicate you want something else.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://909871]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2015-11-28 15:24 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (743 votes), past polls