Re: http headers

2002-04-24 Thread John Brooking
Most recent editions of Perl come with the CGI module, which is what you want. Type "perldoc CGI" at your friendly neighborhood command prompt. The O'Reilly book "CGI Programming with Perl" has a good overview, as do no doubt countless other books. The basic steps are: use CGI; my $cgi = new CGI

Re: http headers

2002-04-24 Thread David vd Geer Inhuur tbv IPlib
Hi There, Here is another one I always use : sub parse_form { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); if (length($buffer) < 5) { $head = $ENV{QUERY_STRING}; } @pairs = split(/\?/, $head); # split vars using ? as delimitor foreach $pair(@pairs) { ($name

RE: exiting correctly

2002-04-24 Thread David Gray
> below is a snipet of the code. the most relavant part. when > i enter some bad data in or mysql has problems, it should go > to error_handler() at the bottom of my script. well it > does, then it returns unless i put an exit at the end of > error_handler. How about: mysub('param1','par

Multi thread ? Programming Style ?

2002-04-24 Thread Connie Chan
Now, I have a CGI script which using GET method to receive Query, and my script looking like this : # C:/PERL/BIN/PERL.EXE # script name : QUERY.PL require "my_external_scripts.pl"; $query = $ENV{QUERY_STRING}; $result = time."_".$ENV{REMOTE_ADDR}.$myPa