Thanks for the compliment. I see what you mean, though. What seemed to me to be a fairly simple deconstruction of the data turns into a fairly complex multilevel perl data structure.
The trick to understanding these (at least what worked for me) is to realize that arrays (and hashes) can only store scalars, not other arrays (or hashes).
Conveniently enough, references to arrays (or hashes) ARE scalars. So rather than an array of hashes (or hash of arrays, or whatever), you can have an array of hashrefs (or a hash of arrayrefs, etc.).
Looking at your data, the first thing that struck me (as it apparently did to several other respondents) was that the lines below 'mSTerminating' appeared to suggest a hash (key/value pairs).
Surmising (apparently correctly) that 'mSTerminating' was a type or descriptor name (i.e., that there might be more than one instance of it), I figured that there should be an array of references to the above hashes.
Finally, we need a hash to associate a reference to this array with the string 'mSTerminating'.
So the data itself suggests the structure: a hash which associates types (e.g., 'mSTerminating') with (a reference to) an array of instances, themselves represented by hashrefs.
Hope this helps.
dmm
Just call me the Anti-Gates ...
In reply to (Re) x 3: Non-fixed data in record
by dmmiller2k
in thread Non-fixed data in record
by brassmon_k
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |