PerlHoo, Part III | 3 | WebReference

PerlHoo, Part III | 3

PerlHoo, Part III

Magic and Grease

Too bad managing a system isn't as magical as solving a complex problem with an elegant solution. Well, writing the management tools aren't too glittery either. In fact, they're usually down-right tedious. Fortunately, I'd already finished Half-Life a couple months ago and am still waiting for Quake III, so I had a bit more time to write than I did for

With any management software you write, you first have to figure out what you've got to work with. Since PerlHoo uses file system directories to represent categories and the data is stored in files, I knew the magic would be recursion, but I'd forgotten how much grease would be required to deal with the CSV files that contain the entries.

Directory File Format

First, let's look at one of the CSV files:,,"Jupitermedia Corp.","Jonathan Eisenzopf",,"CNet News","The CNet News Channel","Jonathan Eisenzopf",

There are five columns in the PerlHoo files:

  1. URL
  2. Title
  3. Description
  4. Submitter Name
  5. Submitter Email
As in, we'll be using the Text::CSV_XS module to manipulate the CSV data files. If you recall, the original reasoning for using CSV files was to allow a non-technical person to maintain the directory using a text editor, word processor, or spreadsheet.

Submission Process

In Part II, we added the ability for users to submit new sites to the directory. Rather than being written to the production file, the new entries were written to the new_perlhoo.csv file. The idea was that an editor would review the file from time to time and choose which entries to move into the production file. Of course, this could get tedious real quick. Check out to experiment with this feature.

Produced by Jonathan Eisenzopf and
Created: July 1, 1999
Revised: July 2, 1999