in reply to Random Password Generator

Hm. Some flaws, like forcing a particular pattern, not using printable chars outside of A-Za-z0-9, etc. Mostly, though, reinventing a well-solved wheel.
use Crypt::RandPasswd; print 'Password: ',Crypt::RandPasswd->chars(9,9), "\n";
The above generates a 9-char random password using Crypt::RandPasswd. If limiting the chars used, etc, is desired, read the POD for that module, as it explains how to restrict character space and other features.

If you're on a UNIX system, importing Crypt::Random will give you access to a better PRNG (using /dev/random or the EGD) that you can hand off to Crypt::RandPasswd. If you're not on UNIX, you can either install a version of EGD for your platform, or try using Crypt::Random::ISAAC - secure random number generator (which, admittedly, is something I wrote for solving the cryptographic randomness issue in pure Perl). EGD (or /dev/random) with Crypt::Random is by far the better choice, if it is available to you (better tested, more mature, etc.)

Larry Wall is Yoda: there is no try{}
The Code that can be seen is not the true Code