I haven't looked at the rest of your code, but your
password subroutine is completely hosed.
Please take a look at the responses you got to your other question, "
To register or not (part 2)",
and especially my response.
Thanks.
jdporter
The 6th Rule of Perl Club is -- There is no Rule #6.