The stupid question is the question not asked | |
PerlMonks |
Re: Clarity in parsing fixed length data.by hv (Prior) |
on Aug 11, 2006 at 10:52 UTC ( [id://566780]=note: print w/replies, xml ) | Need Help?? |
I find unclear the way the two lists are interleaved. In a style similar to that hinted at in GrandFather's comment, I'd tend to write this as list of hashrefs:
At this point you can just as easily construct the list of fieldnames and the unpack string, but it is more self-documenting, and you can easily extend the structures later if you need to start adding validation callbacks and the like. Hope this helps, Hugo
In Section
Seekers of Perl Wisdom
|
|