sub vslice (\@@) { map{ [@{$_}[@_]] } @{+shift}; } sub yxslice (\@@) { my $aref = shift; map{ my $i=$_; [ map{ $_->[$i] } @$aref ] } @_; }