home / experts / perl / tutorial / 3 |
|
|
PerlHoo, Part IIHandling the Query StringNow that we know how to build a URL that sends an add request to the script, we will modify the perlhoo.pl script to handle it.
Let's begin by looking at Line 28: The CGI::Carp module prints detailed error messages to your Web server's error log. By passing in the fatalsToBrowser token, it will also print errors to the Web browser which helps greatly in the debugging process. Next, please note that I've added $new_datafile at Line 34 which defines the filename that recommended sites will be added to until they're removed or added to the PerlHoo directory.
Moving on to Lines 44-52, notice that the main body of our
code now consists of an if->else control structure. Line 44
checks the value of
If |
home / experts / perl / tutorial / 3 |
|
Produced by Jonathan
Eisenzopf and
Created: April 20, 1999
Revised: April 21, 1999
URL: http://www.webreference.com/perl/tutorial/3/