my @vals = map { @$_ } @{ $hash{$key} }; my @pairs; while (@vals) { push @pairs, [ splice(@vals, 0, 2) ]; } $hash{$key} = \@pairs;
In reply to Re: Iterating through referenced arrays wihthin a hash
by ikegami
in thread Iterating through referenced arrays wihthin a hash
by AF_One
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |