in reply to Help understanding inherited script
This code is written with column based parsing of the input line(s).
That is what unpack ("a1 a9 a8 a16 a14 a40 a40 a40 a40 a40 a40 a40 a40 a4... is about.
One character, 9 characters, 8 characters, 16 characters,...etc.
There are a number of reasons why this is a bad format. But it is what it is."C123456789abcedfghi" parses to "c", "123456789", "abcedfghi". "C 89 hi" parses to "C", "89", "hi".
There are of course quite a number of improvements that could be made. However, to just add a column that is what you need to do.
|
|---|