|Don't ask to ask, just ask|
If you're getting "connection error" then I would take a look at your webserver logs. While you've given us over 1500 lines of code, you haven't told us what operating system you're using, what version of Perl you're using, which webserver you're using, etcetera.
You mention there are instructions on the website you downloaded this script from, if it's not a pay-ware product, how about letting us know which website. Heck, the author might even be a local monk!
Take a look at the permissions on the directory you created as well as the scripts. Ensure they all have the correct permissions for the webserver user. Can you view a normal HTML page in a lower directory? Do you get the error immediately or does it take a while to time-out?
There are still a lot of questions you need to answer before we can really help you much. At this point, I'm guessing the problem isn't the Perl code, but it's in the configuration of the files/server.
- - arden.
In reply to Re: perl module for pop3 script