Steve Gross wrote:
    I've just finished developing a small web site that uses Perl, CGI, DBI
and HTML-Template.  Typically, an HTML page calls a Perl script that does a
database fetch, parses the data and then puts it on another web page using a
template.
    I've noticed that most of my web pages look the same:
Get Passed Parameters
Open Database
Build SQL Query
Execute SQL Query
Close Database
Parse Data
Open Template
Pass Data to Template
I repeat this pretty much for each HTML/Perl script. What I was wondering is can I somehow modularize a segment and then call it
from each script?  That way I would only need to write and debug it once.
Something like subroutines but on a more global level.

Sure just use Modules, OO or function based will do depending on the task.

perldoc perlmod

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to