html 怎么才能把参数传进perl内?
<html>
<title> perl example </title>
<body>
<form method="get" action="/cgi-bin/changepasswd.pl">
UserName <INPUT type="text" name="first" SIZE=25><BR>
PassWord <INPUT type="password" name="last" SIZE=25><BR>
<input type="submit" name="StateVariable" value="test it">
</form>
</body>
</html>
怎么才能把username 和password的数据传入perl呢?
#!/usr/bin/perl -w
($username,$plaintext) = @_; #我在这里print $username 和$plaintext全是空的
print "Content-type:text/html\n\n";
srand (time());
my $randletter = "(int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97))";
my $salt = sprintf ("%c%c", eval $randletter, eval $randletter);
#my $plaintext = 1234567890; #shift;
my $crypttext = crypt ($plaintext, $salt);
print "${crypttext}:cvsroot\n";
#print "please input username:\n";
#chomp($username=<STDIN>);
#print "username is: $username\n";
#$username=submit;
my $FoundFlag="False";
my $pwdFile='passwd';
my $tmpPwdFile='temp.tmp';