//CGI and Perl

Replacing a Spreadsheet

2010-05-26T11:25:00+00:00 May 3rd, 2005|CGI and Perl|

Spreadsheets can be powerful tools, and particularly so in the hands of an expert user. A spreadsheet can be used to reorganize data and to extract information not otherwise available. For example, at a client site, an application report generates a listing of hourly billing, but can't give the cross-reference totals desired. The raw output looks something like this:

Handling Missing Data in Inputs

2010-05-26T11:25:20+00:00 May 3rd, 2005|CGI and Perl|

Missing data can be very annoying to a programmer. In fact, it is so annoying that very often we'll write separate programs to clean up data and eliminate unpleasant conditions so that the main program doesn't have to deal with it. Here, I'll show some examples of the kind of problems we see.

Building Perl projects with MakeMaker

2010-05-26T11:25:35+00:00 May 1st, 2005|CGI and Perl|

If you've used UNIX or Linux for some period of time, you've probably written a few Perl programs to automate simple tasks. Each of these programs does something basic and simple that might otherwise take you 10 or 20 minutes to do by hand. In this article, Sean will show you how to convert just such a Perl program into a far more robust programming project, one that will be generic enough to be widely distributed across many disparate platforms.

Web Log Analysis

2010-05-26T11:25:46+00:00 April 30th, 2005|CGI and Perl|

There are many tools available to analyze web page statistics. One of the most popular is Analog, but any web search will turn up hundreds or perhaps even thousands more. There are also options like Hitbox which provides statistics gained through code included in your web pages.

Tips for Convenient CGI Scripting

2010-05-26T11:26:41+00:00 April 28th, 2005|CGI and Perl|

Any CGI programmer benefits from knowing and using ready-made libraries. In this article Eugene Logvinov shows how CGI modules taken from CPAN can not only help you to work effectively and conveniently, but can also provide you with an excellent code and reference library. Consequently, embedding POD (Plain Old Documentation) in the module turns out to be a good choice.

Cultured Perl: Embedding Perl in database tables

2010-05-26T11:27:33+00:00 April 27th, 2005|CGI and Perl|

In this installment, Ted looks at Perl and databases. Specifically, he works with the Class::DBI CPAN module and MySQL to introduce you to embedding Perl in database tables. Databases and the applications that use them are essential to today's computing infrastructures. They are everywhere, from plain-text databases such as the UNIX® /etc/passwd file to large databases such as those that track shopping habits or fight credit card fraud.

Perl Net::FTP

2010-05-26T11:26:48+00:00 April 27th, 2005|CGI and Perl|

Before the wide spread availability of Perl, I would script ftp transfers with .netrc, ksh scripts and other clumsy ways. None of those methods are fun, flexible or easy. On the other hand, Perl's Net::FTP module is all of that.

Fork and Exec with Perl

2010-05-26T11:27:46+00:00 April 27th, 2005|CGI and Perl|

Recently I had a project that required a number of different programs that will mostly run all the time, but need to be restarted now and then with different parameters. Normally, the first thing I think of for a program that runs constantly is inittab or svc (daemontools). The svc facility is the more flexible of the two, and will be what I'll use in the final design, but in the "thinking" stages I played with using a Perl program launcher and controller. What we have is a config file that specifies programs