in reply to help figuring out what a section of script does

It's reading a file of sql insert statements like this:
INSERT INTO FOO VALUES (1,2,3,4,5,X'6789')
It uses the first three numbers to build a filename. The X'' part at the end is hexadecimal-coded. It decodes that part and writes it to the file. The decode loop of the script would be better written as
print OUT unpack("H*",$data);
But that's as may be.

Replies are listed 'Best First'.
Re^2: help figuring out what a section of script does
by AnomalousMonk (Archbishop) on Mar 19, 2017 at 15:33 UTC

      True, but in all fairness I'm new, so I need help identifying what fish I need to fish for ;). At least I'm learning to fish in the Perl pond.

        I'm not sure what you mean here. The purpose of my post was simpy to provide some documentary clarification for a point made by the Anonymous Monk.


        Give a man a fish:  <%-{-{-{-<

        Anonymous Monk mentioned unpack, so AnomalousMonk posted the documentation for that function, along with the documentation for pack, so that you could get a better understanding of what they actually do (essentially, elaborating on anonymonk's answer).