On 4/4/07, Michael Gargiullo <[EMAIL PROTECTED]> wrote:
I have a log file I'm parsing that has special characters at the end of each
row. In vi it appears to be ^@ I've already tried chomp and s/\^\@//
Neither work. Does any one have any ideas?
snip
^@ is one character not two. It is a control character. If I
remember correctly it is the nul character (ascii 0). You could try
s/\000//. If that doesn't work then run the following command to find
out what character it is
perl -ne 'for (split //) { $a = ord; printf "%o\n", $a unless $a >= 32 }' file
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/