[Press your browser's stop button, then click here to go directly to the technical explanation below]

** AGE LIST: **

marriage02/10/200010.08
y2k_201/01/2000 10.18861286
matt_nelson06/11/199910.74
relationship02/10/199218.08
britt06/30/197930.69
lacey07/23/197831.63
warlord_202/04/1978 32.09706034
warlord02/04/197832.10
kate01/16/1978 32.14751696
margie10/01/1976 33.43861286
nza08/22/1976 33.54774528
carolyn_202/23/1976 34.04500555
carolyn02/23/197634.04
smeg_210/30/1974 35.35916080
smeg10/30/197435.36
clint_201/13/1974 36.15573614
clint01/13/197436.16
dad03/01/194862.02
mom04/02/194762.94

** DYNAMIC AGE EXPLANATION: **

All ages on my webpage are computed dynamically, so that they are accurate whenever the user reads them. Basically, many of my hard-coded ages were at least 2 years off, and I realized I'd have to constantly be revising my webpage to have accurate ages. This must stop.

To stop this, I wrote a perl script that takes a birthdate as input, and outputs the age.

The tricky part was passing the parameter (the date) to the script. Since it was not a webform, there was no get or post form input. I had to use a special syntax (within my HTML) that inserts the output of a CGI into that point in the HTML file. However, you could not pass parameters using this method either. They were ignored. So how to pass parameters then? What methods remain?

In order to get around the system, I passed parameters "by filename". I used UNIX's symbolic linking to give my program, "age.pl", several different logical filenames, like:

When the program examines itself using the "$0" variable, it gets the name it was called with (not "age.pl", but "age-clint.pl" or "age-relationship.pl"). I then remove the "age-" and the ".pl" and end up with the entity name -- "clint", "carolyn", "mom", "dad", "britt", "relationsihp", etc. etc.

Once the entity is known, it is compared against a list of birthdates. Adding new entities is as easy as adding a new symbolic link, like age-newperson.pl, and then adding a new entity to the entity list along with it's birth date.

The only exception are these words you are reading right now, which are the entity "explanation" (filename age-explanation.pl). That entity does not return a date but instead returns this page.

Pretty nifty.