I need to generate a username and password pair in order to create user on a Unix system, preferably a pair that would be hard to guess (for security). Does anyone know any good way of doing this using Perl?
UPDATE
So I kind of combined some of the answers below and did some of my own stuff, and this it what I ended up getting. Now these generated usernames and passwords are kind of cryptic and not easy to remember, which is what I was looking for. However, if you're looking for more readable generation, you'll have to tweak it to your liking.
use String::Random qw(random_regex);
use Data::Random::WordList;
my $user = random_regex('\w{3,6}\d{3,6}\w{3,7}') . time . int(rand(1000));
my $wl = new Data::Random::WordList( wordlist => '/usr/share/dict/words' );
my @rand_words = $wl->get_words(int(rand(3)) + 3);
$wl->close();
my $pass = join " ", @rand_words;
$pass .= ' ' . int(rand(1000)) . time;
my $crypt_pass = crypt($pass,'salt');
system "useradd -p $crypt_pass $user";
#you can now login with $user and $pass on your system