in reply to Group 2d array
use strict; use warnings; my %thingy; while (<DATA>) { chomp; my ($index,$value) = split; push @{$thingy{$index}}, $value; } for (sort keys %thingy) { print "$_ ", join('-',@{$thingy{$_}}), "\n"; } __DATA__ 1 0 1 1 2 0 3 1 4 3 4 6
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|