I swear to god and all that's holy that there are no syntax errors in this script, yet Perl is flagging them.
The errors are as follows
syntax error at spill.cgi line 25, near ") {"
syntax error at spill.cgi line 33, near "}"
I've even tried just doing
if(1) {
print "hi";
}
and it still flags an error.
Does this have to do with the
print <<END_HTML statements in my code? Or is it a possible problem with my perl installation or something?
Here's the code (spill.cgi):
#!/usr/bin/perl
use CGI qw/:standard/;
import_names('f');
print header();
use AnyDBM_File;
use Fcntl;
print <<END_HTML
<html>
<head>
<title>DB Spiller</title>
</head>
<body>
<form method="get" action="spill.cgi">
DB Filename: <input name="data" type="text" size=10><br>
<input type="submit" value="Dumb DB Contents">
<input name="action" type="hidden" value="spill">
</form>
END_HTML
if(defined($f::action)) {
tie %db, "AnyDBM_File", "$f::data", O_RDWR, 0644;
foreach $key (keys(%db)) {
print "$key => $db{$key}<br>";
}
}
print <<END_HTML
</body>
</html>
END_HTML