in reply to pack and unpack multiple arrays with one common repeat prefix
For this particular case, you don't need a rep count because the whole thing is very well behaved.
Is this strictly an educational exercise, or do you have more complex data structures to interrogate? If the data is chunked in a different way, Counting Repetitions solves your trouble with parentheses, but this only works in the context where you get to pick how things are packed.print join(',', unpack("C/C* v*", $testinput)), "\n";
my $testinput = pack('C/a* a* a*', (pack 'Cvs', 1, 3, -5), (pack 'Cvs', 2, 4, -6) ); print join(',', unpack("C/(Cvs)", $testinput)), "\n";
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In Section
Seekers of Perl Wisdom