jithint has asked for the wisdom of the Perl Monks concerning the following question:
#!C:/Perl/bin/perl -wT use CGI qw(:standard); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use strict; use Fcntl qw(:flock :seek); print header; print start_html("Poll"); my $outfile="poll.txt"; if(param('club')){ open(POLL,">>$outfile") or dienice ("Can't open poll.txt: $!"); flock(POLL, LOCK_EX); seek(POLL,0,SEEK_END); print POLL param('club')."\n"; close(POLL); } print end_html; #redirect to result.cgi print redirect ("http://10.20.91.122/cgi-bin/result.cgi"); sub dienice { my($msg) = @_; print header; print start_html("Error"); print h2("Error"); print $msg; print end_html; exit; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI redirect
by dsheroh (Monsignor) on Aug 05, 2009 at 15:18 UTC | |
by Anonymous Monk on Aug 06, 2009 at 01:14 UTC | |
by jithint (Novice) on Aug 06, 2009 at 18:39 UTC | |
by jithint (Novice) on Aug 07, 2009 at 16:31 UTC | |
|
Re: CGI redirect
by Foxpond Hollow (Sexton) on Aug 05, 2009 at 15:47 UTC |