- or download this
my @vslice = (['b','c'],
['i','j'],
['y','z']);
- or download this
my @yxslice = ( ['b','i','y'],
['c','j','z'] );
- or download this
#! perl -slw
use strict;
...
[ 'b', 'i', 'x' ],
[ 'c', 'j', 'y' ]
];
- or download this
sub vslice (\@@) { map{ [@{$_}[@_]] } @{+shift}; }
sub yxslice (\@@) {
my $aref = shift;
map{ my $i=$_; [ map{ $_->[$i] } @$aref ] } @_;
}