Now and then I copy data from the web and paste it into a perl script
after "__END__" or "__DATA__". I plan to take the data apart with perl.
The file is generally a BBEdit text file with unix line feeds.

Sometimes there are bullets in the data. According to HexEdit these
bullets are "\xca" characters, but when I try to spot these characters
with "m/\xca/" I find none.

So I look at a line that contains just a bullet, nothing more. HexEdit shows
that line as "CA 0A", a bullet and a new line. On the other hand perl says that
the line has length 3. Using "ord" I see that the line consists of "C2 A0 0A".
To prove its point perl has no trouble finding all bullets with the pattern
"m/\xc2\xa0/".

What is going on here? HexEdit sees one byte for each bullet and perl
sees two. I thought hex stuff was unambiguous, but, as a mathematician,
I am pretty certain that 1 is not equal to 2.


Regards,


Vic

--
*---* mailto:[EMAIL PROTECTED]
|     Victor Thane Norton, Jr.
|     Mathematician and Motorcyclist
|     phone: 419-353-3399
*---* http://vic.norton.name

Reply via email to