I'm completely new to Perl and I thought that would be the best language to solve my simple task. I need to convert a binary file into something readable and need to find and replace strings like \x00\x39
into \x09
(tab) or something like that.
From bash, I started with the following and it works great:
perl -pi -e 's/abc/123/g' test.txt
However, when I start to enter ascii codes, I'm lost:
perl -pi -e 's/0x49/*/g' test.txt
perl -pi -e 's/{char(49)}/*/g' test.txt
How would this command would look like as a line in a perl script? I have about a couple hundred of these find/replacement operations and a 500MB text file. Are there any caveats that I would need to know?
Thanks so much for any help!
Gary