in reply to Random data generation.
my @chars = (A..F); my @strings; while ($#strings < 5) { my $random = join('',map { $chars[int(rand(scalar(@chars)))]; } (1..1 +2)); $random =~ /(.)\1{2}/ and next; push @strings, $random; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Random data generation.
by almut (Canon) on Jun 28, 2010 at 09:44 UTC |