» Login... 

Forrest's Tech Blog

Forrest's thoughts on computer stuff

The Power of Perl

Permalink 04/16/06 by forrest, Categories: code, perl, 161 words  English (US)

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.



Forrest wanted to have a special blog to blather on about Linux, Perl, and stuff, so his mother wouldn't have to read that junk when checking his personal blog.

Archives

Categories


Search

Syndicate this blog



Get Firefox

greenC-Skin for b2evolution by thomas