Created
November 4, 2011 18:40
-
-
Save Shinpeim/1340120 to your computer and use it in GitHub Desktop.
パスワード作るやつ mkpasswd.pl <length> みたいにして使う。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use String::Random; | |
my $length = shift; | |
$length //= 8; | |
die "length must be unsigned int" if $length < 1; | |
for my $i (1..$length) { | |
print String::Random->new->randregex("[a-zA-Z0-9]"); | |
} | |
print "\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment