my $refer = $ENV{HTTP_REFERER};
my $gk1 = substr($str1, -4);
if ($gk1 = .swf) { my $antigk = "gk detected"; }
else
{ my $antigk = $link; }
这段代码有什么问题?编辑后出现一些错误:|
是我的第一个 perl 代码,所以:| 我不知道我做错了什么:|
难道是因为那个
my $antigk
?
THIS is my new error:
Software error:
Global symbol "$str1" requires explicit package name at index_dl.pm line 680.
syntax error at index_dl.pm line 682, near "= ."
syntax error at index_dl.pm line 683, near "else"
Global symbol "$antigk" requires explicit package name at index_dl.pm line 684.
Global symbol "$direct_link" requires explicit package name at index_dl.pm line 684.
syntax error at index_dl.pm line 727, near "}"
Can't use global @_ in "my" at index_dl.pm line 731, near "= @_"
syntax error at index_dl.pm line 735, near "}"
syntax error at index_dl.pm line 761, near "}"
syntax error at index_dl.pm line 779, near "}"
index_dl.pm has too many errors.
For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.
Status: 500 Content-type: text/html
Software error:
[Wed Oct 2 20:40:40 2013] fast_index_dl.cgi: Global symbol "$str1" requires explicit package name at index_dl.pm line 680.
[Wed Oct 2 20:40:40 2013] fast_index_dl.cgi: syntax error at index_dl.pm line 682, near "= ."
[Wed Oct 2 20:40:40 2013] fast_index_dl.cgi: syntax error at index_dl.pm line 683, near "else"
[Wed Oct 2 20:40:40 2013] fast_index_dl.cgi: Global symbol "$antigk" requires explicit package name at index_dl.pm line 684.
[Wed Oct 2 20:40:40 2013] fast_index_dl.cgi: Global symbol "$direct_link" requires explicit package name at index_dl.pm line 684.
[Wed Oct 2 20:40:40 2013] fast_index_dl.cgi: syntax error at index_dl.pm line 727, near "}"
[Wed Oct 2 20:40:40 2013] fast_index_dl.cgi: Can't use global @_ in "my" at index_dl.pm line 731, near "= @_"
[Wed Oct 2 20:40:40 2013] fast_index_dl.cgi: syntax error at index_dl.pm line 735, near "}"
[Wed Oct 2 20:40:40 2013] fast_index_dl.cgi: syntax error at index_dl.pm line 761, near "}"
[Wed Oct 2 20:40:40 2013] fast_index_dl.cgi: syntax error at index_dl.pm line 779, near "}"
[Wed Oct 2 20:40:40 2013] fast_index_dl.cgi: index_dl.pm has too many errors.
Compilation failed in require at ./fast_index_dl.cgi line 53.
For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.