Mostly. You might want to declare $p with my() and use a better variable name. I'd be inclined to put it in a sub though:
sub generate_password { my @chars = ('a'..'z', 'A'..'Z', 0..9); my $length = 9 + rand 7 my $password = ''; $password .= $chars[rand @chars] for 1 .. $length; return $password; }
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Re: Re: Creating random passwords?
by sauoq
in thread Creating random passwords?
by stonecolddevin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |