Roman Numeral Hit Counter

This simple Perl script does four things when called:
  • increments the saved hit counter.
  • translates it into roman numerals.
  • reads the bitmaps for each numeral from a human-readable text file.
  • builds and outputs an image of MIME-type image/x-xbitmap.
The main code sample page shows an example of this counter in action.
[Note that image caching on your browser may prevent you from seeing the counter update properly.  If you'd like to see it increment, leave the counter's page, flush your memory and disk cache, then visit the page again.  Please don't spam it up unnecessarily, though!]

Here is the Perl source code.

Here is the roman numeral bitmap definition file I made.
You can make your own which follows the same format.
(The first line is the height of a bitmap, in pixels.  The width is assumed to be eight.  After that, leave an empty line between bitmaps and represent each pixel with a 0 for white and a 1 for black.)