Agnus Dei (jackal) wrote,
Agnus Dei
jackal

random password generator

#!/usr/bin/perl

sub genRandomString {
   my ($max_length) = @_;
   $max_length ||= 10;
   return join('', map { chr(int(rand(26)) + ord('a')) } (1..$max_length));
}

my $foo=genRandomString(8) ;

print "$foo\n";
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 2 comments