in reply to Cookies
Yes, it is possible and very easy if you use the CGI.pm module (available from CPAN). This is the answer to many questions which arise when writing CGI scripts, so you might want to check it out.
Briefly, two cookies can be set by following this example(see the CGI.pm documentation for more details):
# at the start of your script use CGI; my $query = CGI::new(); # then later my $cookie1 = $query->cookie(-name=>'Name', -value=>$user,); my $cookie2 = $query->cookie(-name=>'Passwd', -value=>$pass); print $query->header(-cookie=>[$cookie1,$cookie2]);
To get cookies back from a user, simply say:
$user = $query->cookie('Name'); $pass = $query->cookie('Passwd');
As you seem to want to save the user's name and password to their machine, you might want to rethink your session management. It is a bad thing to do it as you are because another user on the same computer can easily read someone else's cookies, find out their password, and then pretend to be them.