15 Jul 2005 gnutizen   » (Journeyer)

I am doing a lot of PERL programming now. I've written short scripts in PERL for years, and wrote one very long script a while back, but am not much of an expert. I'll have to learn how to deal with the things needed once scripts get long enough so they don't become spaghetti code. My code was looking like spaghetti code until I broke it into sections - get information, parse information, print information. Next step is putting the information into MySQL, joy. Anyhow, this is taking less time than I thought it would, which is good. Once I finish my information grabber PERL script(s), I will write some PHP (and possibly PERL) scripts that pull this information from the database and put it on a web page. Luckily, CPAN has a lot of the functions I need written already, like HTML parsing. Splits, shifts, pops, and the ability to do sed/regexp stuff easily like this:

$variable =~ s/"//g;

is quite handy. I would probably write my scripts to view this information in PERL as well, but I feel PHP is better, and simpler, for this type of interaction with MySQL. Anyhow, this is all elementary stuff I suppose, but I'm just surprised how quickly and easily I completed my task. If I was a real PERL wizard, I'd probably have done it even faster.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!