- or download this
sub fys {
my $arr = shift;
...
--$i;
}
}
- or download this
@nums = map [ @{$_}[@cols] ], @nums;
- or download this
my @cols = 0..11;
do {
fys( \@cols );
} until is_deranged( \@cols );
- or download this
sub is_deranged {
my $arr = shift;
$arr->[ $_ ] == $_ and return for 0..$#$arr;
return 1;
}
- or download this
use strict;
use warnings;
...
@$arr[$i,$j] = @$arr[$j,$i];
}
}