in reply to creating matrices for PDL module

I don't know much about PDL, but your problem doesn't seem that difficult. You have a file with 4 rows and 5 columns, and you want to compute the determinant of 4x4 matrices obtained by picking, and possibly reordering, 4 out of the 5 columns. Though it's not rocket science to move around columns, it is simpler to move around rows, and since the determinant is not affected by taking the transpose, I'd work with the transpose. I.e. I'd compute the determinants of

pdl [ [4, 2, 6, 8], [2, 5, 3, 4], [9, 5, 5, 6], [7, 4, 3, 6], ], pdl [ [21, 11.5, 15.5, 22], [2, 5, 3, 4], [9, 5, 5, 6], [7, 4, 3, 6], ],
etc. So this is what I'd do (untested):
my @rows; my $j = 0; { local @ARGV = $ARGV[ 0 ]; while ( <> ) { my $i = 0; $rows[ $i++ ][ $j ] = $_ for split; $j++; } } my $dmat = pdl [ @rows[ 0, 1, 2, 3 ] ]; my $damat = pdl [ @rows[ 4, 1, 2, 3 ] ]; my $dbmat = pdl [ @rows[ 0, 4, 2, 3 ] ]; my $dcmat = pdl [ @rows[ 0, 1, 4, 3 ] ]; my $ddmat = pdl [ @rows[ 0, 1, 3, 4 ] ]; # proceed to compute the determinants of the $dmat, $damat, etc.

the lowliest monk