sub combinations{ return map{my $i=$_<<1;[grep{($i>>=1)&1}@_]}0..(1<<@_)-1 } [download]
In reply to Re: Re: permutations of array by I0 in thread permutations of array by NodeReaper