my $pass = $q->param('pass'); if ($pass ne "jerry"){ print "Content-type: text/html\n\n"; print "<HTML> \n"; print "The menu for tonight is \n"; print $words; print ". \n"; print "Hey bub, stop messin' with my menu!"; die; }
#!/usr/bin/perl -w use strict; use CGI qw/:standard/; use CGI::Carp qw/fatalsToBrowser /; my $q = CGI->new(); # Parse Form Search Information # if it's a single form value, map the value as a scalar, other wise, +the value is # and arrayref my %FORM = map { $_, @{[ param($_) ]} > 1 ? [ param($_) ] : param($_) } param(); my $pass = $q->param('pass'); if ($pass ne "jerry"){ print "Content-type: text/html\n\n"; print "<HTML> \n"; print "The menu for tonight is \n"; print $words; print ". \n"; print "Hey bub, stop messin' with my menu!"; die; } my $words = $q->param('words'); if ($words eq ""){ $words = "no specials today"; } open (TEXTFILE,"+>/home/nolaflash/www/menu.txt") || die "where's the d +amn file? : $!"; print TEXTFILE "words="; print TEXTFILE $words; close (TEXTFILE) || die "close damn you : $!"; print "Content-type: text/html\n\n"; print "<HTML> \n"; print "The menu has been updated for you. \n"; print "The menu for tonight is \n"; print "$words. \n";
In reply to Local tests reveal no syntax error but... by jerrygarciuh
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |