LPM: test

Rich Bowen rbowen at rcbowen.com
Tue Nov 16 19:36:38 CST 1999


R Mullikin wrote:
> 
> I'm a total newbie to Perl, and I'm wondering if this might be a good
> application for Perl.  The only thing I've done so far in Perl is a
> little program to clean up and format an IIS log file so I could read
> it.
> 
> Anyway, would Perl be a good tool to use to take a file of
> comma-delimited data and spin it into a bunch of fixed-format web
> pages (by fixed format I mean that there's a bunch of static HTML and
> the data from the file goes in the same place on each page)?

Perl would be absolutely ideal for such a thing. In fact, it was
invented to do something not terribly unlike that. It was before the web
and HTML, but the idea was similar - taking a bunch of data files, and
spinning then into fixed-format reports.

One module that would be really good for this would be the
Text::Template module, which takes a static template file (could be
HTML) and puts data into fixes places on that template.
 
> Also, are there any good repositories of 'code-snippets' which might
> keep one from constantly re-creating the wheel?

Yes. It's called CPAN. http://www.cpan.org/ There is also a "scripts"
section within CPAN that is good for snippets and whole functioning
scripts. But the bulk of CPAN is modules, which give you additional
functionality for doing stuff. Come to Perl Mongers next month, and
you'll learn all about modules!

Rich
-- 
http://www.ApacheUnleashed.com/
Lexington Perl Mongers - http://lexington.pm.org/
PGP Key - http://www.rcbowen.com/pgp.txt



More information about the Lexington-pm mailing list