Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Slightly OT - Matching a strange character

by NovMonk (Chaplain)
on May 19, 2004 at 16:06 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-19 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found