http://qs321.pair.com?node_id=546609

gitarwmn has asked for the wisdom of the Perl Monks concerning the following question:

Hello,
I'm dabbling with a CGI login page for the first time so I can learn a bit about CGI and I am using a simple flat file to write data to for the moment. When I open the file and try to print the users information to the flat text file it doesn't seem to print the information only the variable divider. Can someone tell me what I'm doing wrong?
Thanks

#!c:/perl/bin/Perl.exe use CGI qw(:standard); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use Fcntl qw(:flock :seek); use CGI; use CGI::Cookie; use XML::Simple; use strict; my $passfile = "userfile.txt"; print header; print start_html("New User"); my $q = CGI->new; my $self = $q->url; # the path to this script my $username = $q->param('username') ; my $first = $q->param('first') || ''; my $last = $q->param('last') || ''; my $pass1 = $q->param('pass1') || ''; my $pass2 = $q->param('pass2') || ''; #new user signup page print <<End_of_HTML; </head><body bgcolor="#ffffff"> <form action="http://localhost/newuser.cgi?action=newuser?first?last" +method="post"> <h2>New User Form</h2> First name? <input type="text" name="first" value=""> <br />Last name? <input type="text" name="last" value=""> <br />Username (2-12 characters)? <input type="text" name="username" +value=""> <br />Password <input type="password" name="pass1"> <br />Password (verify) <input type="password" name="pass2"> <input type="hidden" name="action" value="validate_newuser"> <br /> <br /> <input type="submit" value="Go!"> </form> <br /> <br /> <i>Thank you for signing up. </i> End_of_HTML open(FILE, ">>$passfile") or die "can't open password file"; print FILE "$first:$last:$username"; close(FILE);

2006-05-02 Retitled by GrandFather, as per Monastery guidelines
Original title: 'Wondering why this doesn't work'