Skip to content

Instantly share code, notes, and snippets.

@Shinpeim
Created November 4, 2011 18:40
Show Gist options
  • Save Shinpeim/1340120 to your computer and use it in GitHub Desktop.
Save Shinpeim/1340120 to your computer and use it in GitHub Desktop.
パスワード作るやつ mkpasswd.pl <length> みたいにして使う。
#!/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