I might be missing something, but you seem to be overcomplicating somewhat.
(This is simplified for testing purposes)
#!/usr/bin/perl use strict; use warnings; my @A = 'A' .. 'Z'; my @B = 1 .. 100; my $size = 10; my %strings; while (keys %strings < $size) { $strings{ $A[rand @A] . '-' . $B[rand @B] } = 1; } print join ',', keys %strings;
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: Filling hashes
by davorg
in thread Filling hashes
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |