in reply to Random string generator
This is the one I use. I wouldn't say it was necessarilly better. It's more flexible though.
sub rndStr{ join'', @_[ map{ rand @_ } 1 .. shift ] } print rndStr 8, 'A'..'Z'; VUXGFLAV print rndStr 8, 'a'..'z'; jplojhxe print rndStr 8, 'a'..'z', 0..9; recv1wym print rndStr 8, 'a'..'z', 0..9; 434d0wwo
Examine what is said, not who speaks.
The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Random string generator
by jonadab (Parson) on Feb 06, 2003 at 03:49 UTC | |
by BrowserUk (Patriarch) on Feb 06, 2003 at 08:12 UTC | |
by haxordan (Novice) on Feb 06, 2003 at 15:02 UTC | |
by BrowserUk (Patriarch) on Feb 06, 2003 at 15:47 UTC |