Think about Loose Coupling | |
PerlMonks |
Re: Help with raw data.by davido (Cardinal) |
on Oct 23, 2003 at 19:33 UTC ( [id://301684]=note: print w/replies, xml ) | Need Help?? |
\302 may be the octal code for A^ (A with a cap over it). The number is too high for it to be a decimal representation of an ASCII character. But that's just one possibility; it may also be Unicode. Perl (current versions) has Unicode support. U is seen literally. And ^K is "control K", which is a character that doesn't actually print visibly using more.
How can I convert that from raw to hex or raw to decimal? You can use unpack, or use ord while iterating over each position in the string, to name a couple starting points. How does it look to a regular expression? It looks like a string of three characters: "A^" (I don't know the keystrokes for A with a cap over it), "U", and "^K" (control K). How you write your regexp will determine how the regexp deals with those characters. Hope this helps... Dave "If I had my life to do over again, I'd be a plumber." -- Albert Einstein
In Section
Seekers of Perl Wisdom
|
|