in reply to How do I POST info to a server?

CGI.pm is not appropriate in this case, as it is designed to run on the server side. In your example, you need something designed to work as a client.

Have a look at the LWP bundle -- especially LWP::UserAgent. It contains a credentials() method which will allow you to set a username and password.