in reply to Re: Re: constructing large hashes
in thread constructing large hashes

I had another thought on the way home from work. You don't need the temp array, just build the hash in the code block for permute!

permute { $temp = join(',',@n); $arrangement{$temp} = undef;} @n; # create the hash here --^^^^

That should save some memory - and on my system, about a minute. As far as the separators, maybe pack the permutation into the key?

permute {  $arrangements{pack "C*", @n} =1 } @n;

is almost instantaneous. Won't help with 10 or more...