0: #Here's a quicky password generator sub.
1: #Great for account creation
2: # Usage: my $Password = Pass();
3:
4: sub Pass
5: {
6:
7: my $Num;
8: my $Other;
9: my $Pass = "";
10:
11: foreach $Num (1..8)
12: {
13: $Other = rand 122;
14: $Other =~ s/\..*//; #ditch the decimal part
15: while ( ($Other < 48)
16: || (( $Other > 57) && ( $Other < 65))
17: || (( $Other > 90) && ( $Other < 97)))
18: {
19: $Other = rand 122;
20: $Other =~ s/\..*//; #ditch the decimal part
21: }
22:
23: $Pass = $Pass . chr $Other;
24: }
25: return($Pass);
26: }
In reply to Quicky password sub by halxd2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |