# ...snip my ($n,$i,@n,@temp,%arrangements); # get size and create all permutations (comma separated) $n = 8; @n = (1..$n); $i = 0; $temp[&_fact($n)-1] = 1; # _fact := n! $|++; permute { $temp[$i++] = join(',',@n) } @n; print STDERR scalar(localtime),$/; @arrangements{@temp} = undef; print STDERR scalar(localtime),$/;