[Nh-pm] removing embedded hex from a text file?
pll at lanminds.com
pll at lanminds.com
Wed Oct 30 15:18:13 CST 2002
Hi all,
I have what's *supposed* to be a csv file dump of a spread sheet.
However, when I print it out using perl, I see the chars <A0> in the
file all over the place. When I look at it in hexl-mode in emacs,
sure enough, those same characters are 0xa0.
How can I easily replace those in a quick perl one-liner? I was
originally trying to remove exess spaces, which is what lead me to
discover these characters.
I'm sure this is an obvious thing, but my brain isn't working well
right now. I tried:
perl -ane '$_ =~ s/0xA0//; print "$_\n";' file.csv
But since 0xA0 is a character, not a string, this won't work.
Thanks,
--
Seeya,
Paul
--
It may look like I'm just sitting here doing nothing,
but I'm really actively waiting for all my problems to go away.
If you're not having fun, you're not doing it right!
More information about the Nh-pm
mailing list