# 1から8文字のパスワード文字列を生成する sub mkpass{ my (@L) = ("A".."Z", "a".."z", "0".."9"); my $pwLength = 8; join undef, map { $L[int rand @L] } (1..$pwLength); }