Perl website login and session

Hi,

I'm currently working on a perl website, and I would need a system where a few users can login into the administration side of the site. about 5-10 users maximum, all pretty simple.
I was thinking of using an .htaccess file and a seperate admin folder on the server. I'm wondering if there is any way to use the username someone entered in the perl scripts on the admin pages. (for example, to put a "logged in as:" field on the webpage somewhere). Maybe there is a variable or something I can use.

I'm also wondering what my other options are in this matter, for instance, making an actual login page, how would this work? can I make a users table in a database then (with password encryption).. I'd like it to be secure.

Any help is welcome, this is a good learning experience.

The variables are present in a POST or GET hash table, depending on your form method, usually POST. The key is the name you supplied in the name field in the html input tag and the value is the value the user entered.

perl.com: Beginners Intro to Perl - Part 4

You can then lookup the usernames and passwords in a database and match the CGI supplied and the database retrieved values.

perl.com: Database Programming with Perl

you may make use of CGI::Session to maintain a session