当我用我正在做的 CGI 表单测试构建时,我在下面遇到了这个错误。我正在尝试验证用户是否在 CGI 表单中输入了数据,并且该值是否已提交。有什么我想念的吗?
问候,
C:\xampp\cgi-bin>perl create_report.cgi
Can't modify logical and (&&) in scalar assignment at create_report.cgi line 105
, near "'Submitted')"
代码:
if (defined $user_entry && $user_entry='Submitted') {
sub show_form {
print qq{<form name="input" action="create_report.cgi" method="post">\n};
print qq{<table align="center" border="1" bordercolor="black" cellpadding='2' cellspacing="0">\n};
print qq{<tr>};
print qq{<td align="right">Please enter the description of the Report you are copying</td};
print qq{</tr>\n};
print qq{<tr>};
print qq{<td align="left"><input type"text" width="7" name="spns" value=""};
print qq{<BR>Be sure to use just one or two words to find the report. Like "Mortgage Summary".</td>};
print qq{</table><center><input type="submit" value="Submitted"></center></form>\n};
}