So I'm having a bit of a problem with a CGI script. It runs fine, except for the little problem that param(x) doesn't work at all. It will either crash the program or return an undefined value.
#!/usr/bin/perl
use warnings;
use CGI qw(:standard );
$temp=uc(param('class'));
$class=chomp ($temp);
$temp=uc(param('type'));
$type=chomp ($temp);
$temp=uc(param('first'));
$first=chomp ($temp);
$temp=uc(param('last'));
$last=chomp ($temp);
$temp=param('area');
$areacode=chomp($temp);
$temp=param('firstnum');
$first3=chomp($temp);
$temp=param('secondnum');
$last4=chomp($temp);
$temp=uc(param('carrier'));
$carrier=chomp($temp);
$num="$areacode$first3$last4";
open (PER, ">../data/USERS/$type/$first.$last.dat");
print (PER "$first $last\n$class\n$num\n$carrier");
close (PER);
print ("Content-Type:text/html\n\n");
print "<html><body>";
print '<h4>Thank you. Please email the Administrator at <a href="mailto:apcsci@gmail.com">xxxx@gmail.com</a> with any questions or comments</h4>';
print "</body></html>";
Thanks