spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / perl / tutorial / 5

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

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 phadmin.pl than I did for perlhoo.pl.

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:
http://www.Internet.com,Internet.com,"Jupitermedia Corp.","Jonathan Eisenzopf",eisen@pobox.com
http://www.news.com,"CNet News","The CNet News Channel","Jonathan Eisenzopf",eisen@pobox.com

There are five columns in the PerlHoo files:

  1. URL
  2. Title
  3. Description
  4. Submitter Name
  5. Submitter Email
As in perlhoo.pl, 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 http://www.webreference.com/cgi-bin/perl/3/perlhoo.pl to experiment with this feature.


home / experts / perl / tutorial / 5

http://www.internet.com

Produced by Jonathan Eisenzopf and

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint


Created: July 1, 1999
Revised: July 2, 1999

URL: http://www.webreference.com/perl/tutorial/5/