Take a look at the docs for unpack (also pack as it carries more information).
Briefly, the format template 'xa5x2a3x2a15x2a6x2a5x2a5x4a5x9a8x4a9x5a5x15a5x4a9', consists of 2 types of format specifier.
- 'x' & 'xN', which skips forward over 1 or more characters.
Used here to skip over the inter-column whitespace.
- 'aN', which 'captures' N characters.
This is used to extract the fixed format fields.
The results are assigned into the array @temp. Note that the length specifiers I've used are quickly approximated from the example posted, you will want to review the values carefully in the light of your full data.
Unlike a regex capture, what is in the bytes captured is irrelevant, it is based entirely upon the character positions (like substr). I've attempted to show how the parsing works below, but the stupid wrap 'feature' of PM means it doesn't really work.
< 0> <1> < 2 > < 3 > < 4 > < 5 > < 6 >
xaaaaaxxaaaxxaaaaaaaaaaaaaaaxxaaaaaaxxaaaaaxxaaaaaxxxxaaaaaxxxxxxxxx
0 CDE, DEBORAH M. AAF103 FJB1A FTB5A 3.0
< 7 > < 8 > < 9 > <10 > < 11 >
aaaaaaaaxxxxaaaaaaaaaxxxxxaaaaaxxxxxxxxxxxxxxxaaaaaxxxxaaaaaaaaa
.02 107.83 3.0 .02 107.83
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|