SLUG Mailing List Archives
Re: [SLUG] perl substitution of metacharacter
- To: Rachel Polanskis <r.polanskis@xxxxxxxxxxxxxxxxx>
- Subject: Re: [SLUG] perl substitution of metacharacter
- From: John Ferlito <johnf@xxxxxxxxxx>
- Date: Mon Aug 28 11:37:45 2000
- Cc: slug@xxxxxxxxxxx
- User-agent: Mutt/1.2.5i
On Mon, Aug 28, 2000 at 11:20:27AM +1100, Rachel Polanskis wrote:
> I have a little problem that I don't seem to be able to nut
> 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.
> I know I can use the ^V function in vi to print these but it just doesn't work
> for this particular character - I can't get vi to print this character in my
> I would use "chr()" if I thought I knew what the literal string for
> a ^@ was but I don't and there's no info on the net I can find either.
> Can someone please enlighten me as to what I need to do to to rid myself
> of these ^@ symbols?
garfield:~# ascii ^@
ASCII 0/0 is decimal 000, hex 00, octal 000, bits 00000000: called ^@, NUL
Official name: Null
So it's just a null so something like
print $c unless ($c = 0);
> Rachel Polanskis University of Western Sydney, Nepean
> Senior UNIX Admin PO Box 10, Kingswood NSW 2747
> Systems && Operations Information Technology Services, Kingswood
> r.polanskis@xxxxxxxxxxxxxxxxx Phone: +61 (0247) 360 291
> SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
> More Info: http://slug.org.au/lists/listinfo/slug