SLUG Mailing List Archives
Re: [SLUG] perl substitution of metacharacter
- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] perl substitution of metacharacter
- From: James Wilkinson <jamesw@xxxxxxxxxxxxxxxxxxx>
- Date: Mon Aug 28 11:39:31 2000
- Reply-to: James Wilkinson <jamesw@xxxxxxxxxxxxxxxxxxx>
- User-agent: Mutt/1.0.1i
On Mon, 28 Aug 2000, Rachel Polanskis generated:
>I have a file that's being processed by Perl that has a bunch of
>"^@" symbols in it. This is the "Control-at" character.
>I want to expunge the file of all the "^@" symbols.
How did you determine that they're ^@? If you used less or vi or some
other pager, chances are that they're really NULs.
I just looked at the ascii manpage (man ascii) and here's another bit of
trivia: A is 0x41, B is 0x42, @ is 0x40. SOH (chr(1)) is 0x1, STX
(chr(2)) is 0x2, and NUL is 0x0. So your control characters are
represented by an ascii character of their value + 0x40 (with CTRL, of
"We're like sisters... with really different hair!"
-- Cordelia Chase, Buffy the Vampire Slayer