my @column_indices = $col1 .. $colN; return [ map { sub{ \@_ }->( @{ $$data[$_] }[@column_indices] ) } $row1 .. $rowN ]