A subroutine to generate a password :-) When you find it hard to create one.
sub generatePassword
{
my $passwd_size = shift;
my @alphanum = ('a'..'z', 'A'..'Z', 0..9,'!','#','$','%','&','*','@','`');
my $password = join '', map $alphanum[rand @alphanum], 0..$passwd_size;
return $password;
}
Usage
&generatePassword(10); ### returns password of 10 chars
Friday, November 17, 2006
Subscribe to:
Post Comments (Atom)
1 comment:
Amiable brief and this post helped me alot in my college assignement. Say thank you you for your information.
Post a Comment