in reply to Re: permutations of array
in thread permutations of array

#Yet another way to do it
sub combinations{ return map{my $i=$_<<1;[grep{($i>>=1)&1}@_]}0..(1<<@_)-1 }