The above Zippyism should change every time you refresh this page.
I created this page as an exercise in perl cgi programming, and how to embed it in web pages. Apologies to Zippy creator Bill Griffith. Anyone that has used the EMACS editor should know about the old META X insert-zippyism, apropos-zippy, etc. These (like all) Emacs extensions are written in Lisp, and I never did get a handle on the intricacies of Lisp programming. Perl, however, is very C-ish, and a no brainer for me. The main hurdle was to understand the way perl handles text files. The zippy quotes for Emacs are stored in <emacs_install_path>/etc/yow.lines. It is actually a collection of about 750 NULL terminated strings. In C, parsing this would not be a problem, and as it turns out, it's even easier in Perl. Because most text handling routines in perl are line oriented, the record separator is by default NL (new line).or CR (carriage return), NL depending on whether you are on a Windows or UNIX system. Because yow.lines has NL embedded in what is intended to be a single string, the default record separator does not work. All that needs to be done is to change the record separator ($/) to "\0". After reading the file into an array, it might be nice to restore the record separator to whatever it was previously.
Wups! Just fired up the linux box and learned
that I was
leaving the NULL terminator in the string, so had to chomp it
off.
Update Setting up a local server for development, yow-rnd.pl stopped working. There was extra whitespace in the shebang directive (#!/usr/bin/perl). This caused the script to not run on my home server.