- or download this
my @x = qw"q s t l y a p c f v i r d w k o j b";
- or download this
my @p = sort { $x[$a] cmp $x[$b] } 0 .. @x-1;
- or download this
my $d = 0; my @s;
for my $s (0 .. @p - 1) {
...
}
if (0 != $d%2)
{ say "odd" } else { say "even" }
- or download this
use File::Temp "tempfile";
my($T, $N) = tempfile("perm-XXXXXXXX", UNLINK => 1);
...
close $T or die;
my $s = qx"gap -q <$N";
if (1 == $s) { say "even" } elsif (-1 == $s) { say "odd" } else { die
+}