Perl user id

I need to capture the user id from the login by a customer to access a secure directory and store it in a variable. Access is set up now with Dreamhost’s default login. I can create my own login screen, but then I need to submit the id and pwd as Dreamhost does currently, and I don’t know how.

What do you mean, “Access is set up now with Dreamhost’s default login” ?? Are you saying that you used the Web Admin Panel to setup a password-protected directoy using an .htaccess file? If so, that is done using HTTP Authentication which does not allow for a custom login page - it has nothing to do with HTML/CGI, the login is done behind the scenes between the browser and Apache. Apache will sent the environment variable “REMOTE_USER” to the username, so you can access it in Perl with $ENV{‘REMOTE_USER’}.

If you want a custom login screen, you won’t be able to use HTTP authentication, and you’ll have to implement your own authentication process, just like DreamHost does when logging into the Web Admin Panel. However keep in mind the difference - with HTTP authentication, Apache checks every request for you, but with another method, its harder to secure non-executable items like images, etc.