Elijah's Perl Stuff

Progams and modules

My CPAN directory has these things in it:

Image::PBMlib (tar/gzip)
This is a module to aid in reading portable bitmap (PBM), graymap (PGM), and pixmap (PPM) images, since reading these is harder than writing them. (The format is designed to be very easy to read and write, but any reader needs to support six different on disk formats, while a writer can just use the ones it wants.)
Time::SoFar (tar/gzip)
A friendly interface to using the $^T ($BASETIME with "use English") variable.
bget (perl script)
My http downloader. There are many http downloaders, what makes mine significantly different than the others?
  1. Full header emulation for more than 30 user-agents. Not just setting a "User-Agent:" header, but all the right headers in the correct order.
  2. It doesn't try to parse html. If you want a mirroring tool, try wget, but consider that what URLs in a page get followed vary from user-agent to user-agent. Netscape will get LOWSRC=URL and SRC=URL objects from an tag, while IE will only get the latter. bget won't try to guess what you want to get.
  3. If you have a large number of URLs you want to get, and you want to get them subtly, bget has fixed and random delays between page loads, can supply a different "Referer:" header to each load, can guess a filename based on URL or be told what to use.
  4. Web server testing options, like connecting to one hostname but using a "Host:" header for a different hostname; printing just the response headers without doing a "HEAD" request, exit code based on HTTP response status, option to use the Benchmark module for timing multiple requests.
extract-form (perl script)
Proof of concept form exposer. The purpose of this tool is to illustrate the lack of security in client side web form controls. Given a URL this will extact all forms on that page and create a new html page that converts all hidden fields to text inputs, removes javascript verification, etc.
hgrep (perl script)
A header grepper for mail or news files, defaults to newspool style (one message per file) but can also process mbox files. Written for doing things like bulk deletion of spam for a newsgroup I moderated, and expanded from there.
mimedump (perl script)
A MIME extraction tool I used to automatically extract attachments from incoming mail with procmail.
ppmmosaic (perl script)
Expand pixels in a portable pixmap to make mosaic-like images. Uses my Image::PBMlib library.
pwhois (perl script)
Simple whois client program that follows redirects to other whois servers.

Other Stuff

I wrote a piece on "When Not to Use Regular Expressions" for the Oakland Perl Mongers.