in reply to [splice], explanation please?
splice is great. Here is how you can remove a whole
column from a two-dimensional array:
The end result is the middle column of @table is removed and assigned to @col.use strict; use Data::Dumper; my @table = ( [qw(a b c)], [qw(d e f)], [qw(g h i)], ); my @col = map { splice @$_,1,1 } @table; print Dumper \@col;
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)
|
---|
In Section
Seekers of Perl Wisdom