Dear monks teach me something.. I'm having this issue a lot lately. I either scrape a website, or a pull in data from a csv, and I get stupid garbled non-sense like this:
SERIAL# �-----------------. WD2PD644366123
I know what to do insomuch as this involves using `od` but when it comes to ridding the characters in perl, I always get lost, and up figuring it out with an almost brute force approach.
So `od -c` will output
0104200 D 5 3 0 0 6 \n S T O C K N +O 0104220 375 - - - - - - - - . . . . . . +.
so the character I want remove has a od code of 0375 -- obviously that isn't right..
`od -xc` will return this
2dfd 375
not sure what this means
`hexdump -c` returns
0008880 D 5 0008890 375 - -
so 375 is obviously significant in `od -c` (oct) or `hexdump -c` (hex) ... Could someone please explain or point me to where I can find out how to use these utilities effectively, and how I strip them from text, I thought a simple tr/\{something here}//d would work...
See Re^2: hexdump/od/perl question which is on this thread. Note to readers you don't always address octals with a leading 0
In reply to hexdump/od/perl question by EvanCarroll
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |