Skip to content | Skip to menu | Skip to search

Forrest's Tech Blog

Forrest's thoughts on computer stuff

The Power of Perl

Perl is a much-malingned as a write-only language by those who don't know it, but they just don't understand the power.

Here's a little anecdote which should clear things up:

In a late morning meeting at work, I learned that there was some document corruption problem which was rare and difficult to catch, which showed up in our pdf documents as a double question mark ("??"). Although I only know very little about the pdf format, I said "Oh, I bet I can write a perl program to detect that!"

When I got back to my cube, I searched CPAN for "pdf" and spent about half an hour going over my numerous pdf library choices before finally settling on CAM::PDF.

Extracting text from the pdf was then a piece of cake, and of course searching for "??" is a trivial matter for perl's famous regular expressions.

By the end of that day I had a working program. That's the power of perl.

This site works better with web standards! Original skin design courtesy of Tristan NITOT.