sub random_string { my $length = shift || 2; my @chars = ('a'..'z','A'..'Z',0..9); join ('',map{ $chars[ rand() * @chars ] } (1..$length)); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Generate (somewhat) Random Strings
by Anonymous Monk on Jun 25, 2003 at 03:07 UTC | |
by shotgunefx (Parson) on Jun 25, 2003 at 20:12 UTC |