![]() |
|
No such thing as a small change | |
PerlMonks |
Re^7: pack and unpack multiple arrays with one common repeat prefixby kcott (Archbishop) |
on Jun 17, 2017 at 06:45 UTC ( #1193007=note: print w/replies, xml ) | Need Help?? |
I'm glad to see that had, at least some, appeal. It was, as stated, somewhat "primitive". Expanding upon that a little, the following is more generally what I had in mind, which removes duplicate code and separates the "decoding engine (code)" (putting it into Decoupled.pm). The expanded script (note there's no change to the original while loop or input data):
The Decoupled module:
The new output:
— Ken
In Section
Seekers of Perl Wisdom
|
|