Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Slightly OT - Matching a strange character

by NovMonk (Chaplain)
on May 19, 2004 at 16:06 UTC ( #354666=note: print w/replies, xml ) Need Help??


in reply to Slightly OT - Matching a strange character

Thanks EdwardG for the pun, and Waswas for the direction. The character in question is \222, and it is now neutralized. As are a couple of others I didn't see which had also sneaked in uninvited. Thanks for your help.

Pax vobiscum,

NovMonk

Update: Here's my code that worked:

while (<FILE>){ s/\222/'/g; s/\226/-/g; <do more stuff>; }

The character in question is an octal, which I found in an escaped character table once I used Waswas's idea to see what it really was. Thanks again everyone.

Replies are listed 'Best First'.
Re: Re: Slightly OT - Matching a strange character
by Roy Johnson (Monsignor) on May 19, 2004 at 17:38 UTC
    May I recommend
    tr/\222\226/'-/;
    instead of your two s///'s?

    The PerlMonk tr/// Advocate
      You may indeed. You are a God. Or well, ok, only a Bishop. Regardless, thanks!

      NovMonk

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2022-05-22 02:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (78 votes). Check out past polls.

    Notices?