That script will generate encrypted passwords in the old /etc/passwd style. If you want to generate them in the /etc/shadow style, change the salt line to this:
Code:
my $salt = sprintf ("\$1\$%c%c%c%c\$", eval $randletter, eval $randletter, eval $randletter, eval $randletter);
You can have up to 8 '%c's, but each one must have a matching 'eval $randletter'.