tags:

views:

251

answers:

3

After upgrading Perl, I receive some errors in a Perl CGI script:

Unquoted string "type" may clash with future reserved word at convertit.cgi line 183. Can't modify constant item in scalar assignment at convertit.cgi line 183, near ""text/javascript\">flashPreloadFinish ('http://www.myurl.com/mysite.html');\n";" convertit.cgi had compilation errors.

Line 183-184:

print "<script type=\"text/javascript\">flashPreloadFinish
('http://www.myurl.com/mysite.html');&lt;/script&gt;\n";
print "</body></html>\n";

Any ideas?

+3  A: 

An earlier line has an unclosed ".

ysth
+3  A: 

I don't see any problems with your code, but I'd suggest rewriting it as

print <<'EOT';
<script type="text/javascript">flashPreloadFinish('http://www.myurl.com/mysite.html');&lt;/script&gt;
</body></html>
EOT
Alexandr Ciornii
+4  A: 

See my Troubleshooting Perl CGI scripts or brian's Guide to Solving Any Perl Problem. Both of them take you through the steps to figure out what's going wrong.

brian d foy