my $choices = join "\n ", map { "( .{$_} (?{ my \%r = \%{\$^R}; \$r{$_}++; +{ \%r } }) ){0,".(int($amount/$_))."}" } @bills;