my @alphabet = (('a'..'z'), 0..9); my %collection; for (1..30) { my $len = rand(11) + 10; my $key = join '', map {$alphabet[rand(@alphabet)]} 1..$len; $collection{$key} ? redo : $collection{$key}++; } print join "\n", keys %collection;
In reply to Re: Perl : How to Create Unique String/Number?
by Roy Johnson
in thread Perl : How to Create Unique String/Number?
by EchoAngel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |