Reading Data Into Your Perl Script
-
The book mentions one way to do it in Chapter 5.
-
But, there is an easier, more standard way to do it, using libraries.
-
The KISS principle.
-
CGI.pm
and cgi-lib
-
Both libraries work pretty much the same way-they read in the input data,
parse it, put it into an object, and make it easy to access the data.
-
Parsing the data is the hard part. They take care of this for you.
-
Both are widely available wherever Perl is found. Thus, I highly
recommend using them.
-
Even if they are not available, they are freely distributable. You
can always just copy them into your local directory and use them there.
-
You already use these. The examples we copied over in the last class
use CGI.pm and cgi-lib. You can copy and paste these, then adapt
them to your needs.
A look at CGI.pm
Home