jerrygarciuh has asked for the wisdom of the Perl Monks concerning the following question:
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";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Local tests reveal no syntax error but...
by thraxil (Prior) on Sep 14, 2001 at 23:55 UTC | |
by jerrygarciuh (Curate) on Sep 14, 2001 at 23:57 UTC | |
by thraxil (Prior) on Sep 15, 2001 at 00:01 UTC | |
by herveus (Prior) on Sep 15, 2001 at 00:23 UTC | |
Re: Local tests reveal no syntax error but...
by lemming (Priest) on Sep 15, 2001 at 00:06 UTC | |
Re: Local tests reveal no syntax error but...
by dragonchild (Archbishop) on Sep 14, 2001 at 23:49 UTC | |
by jerrygarciuh (Curate) on Sep 14, 2001 at 23:54 UTC | |
Re: Local tests reveal no syntax error but...
by Dr. Mu (Hermit) on Sep 16, 2001 at 00:00 UTC |