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

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!!

Replies are listed 'Best First'.
Re^5: all binary combinations
by ikegami (Patriarch) on Sep 04, 2009 at 17:07 UTC
    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);