perl生成随机密码
follow 没有小桥的来的爽。哈哈。
非常简洁呵呵,平时我生成密码也是这么做的。我会生成10个 然后自己挑选一个喜欢的。 #!/usr/bin/perl
use strict; use warnings;
my @a = (0..9,’a’..’z’,’A’..’Z’,’.’,’/’,’-‘,’=’,'[‘,’;’,’#’,’!’,’$’,’%’,’*’); my $passwd_length = 15;
sub random_passwd { join ”, map { $a[int rand @a] } 1 .. 15; }
for (1..10) { print random_passwd,”\n”; }
哈,你是正统的少林派,我属于逍遥派。。。
称呼 (必填)
邮件 (必填)
网站 (可选)
follow 没有小桥的来的爽。哈哈。
非常简洁呵呵,平时我生成密码也是这么做的。我会生成10个 然后自己挑选一个喜欢的。
#!/usr/bin/perl
use strict;
use warnings;
my @a = (0..9,’a’..’z’,’A’..’Z’,’.’,’/’,’-‘,’=’,'[‘,’;’,’#’,’!’,’$’,’%’,’*’);
my $passwd_length = 15;
sub random_passwd {
join ”, map { $a[int rand @a] } 1 .. 15;
}
for (1..10) {
print random_passwd,”\n”;
}
哈,你是正统的少林派,我属于逍遥派。。。