in reply to Re^2: all binary combinations
in thread all binary combinations

Yes. Iterate over the results and use each result as a key.

Replies are listed 'Best First'.
Re^4: all binary combinations
by perlrocks (Acolyte) on Sep 04, 2009 at 16:27 UTC
    I figured that but the thing is that i don't know how and where the results are stored. I read about glob but that confused me more!!
      The results are returned by the bits function as a list. You can iterate over the list using a foreach loop, a hash slice, map, etc.
      my %hash; for my $bits ( bits(3) ) { $hash{$bits} = ...; }
      my %hash; @hash{ bits(3) } = ...;
      my %hash = map { $_ => ... } bits(3);