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

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);