| marriage | 02/10/2000 | 8.26 |
| y2k_2 | 01/01/2000 | 8.36348164 |
| matt_nelson | 06/11/1999 | 8.92 |
| relationship | 02/10/1992 | 16.26 |
| britt | 06/30/1979 | 28.87 |
| lacey | 07/23/1978 | 29.80 |
| warlord_2 | 02/04/1978 | 30.27192913 |
| warlord | 02/04/1978 | 30.27 |
| kate | 01/16/1978 | 30.32238575 |
| nza | 08/22/1976 | 31.72261406 |
| carolyn_2 | 02/23/1976 | 32.21987433 |
| carolyn | 02/23/1976 | 32.22 |
| smeg_2 | 10/30/1974 | 33.53402959 |
| smeg | 10/30/1974 | 33.53 |
| clint_2 | 01/13/1974 | 34.33060493 |
| clint | 01/13/1974 | 34.33 |
| dad | 03/01/1948 | 60.20 |
| mom | 04/02/1947 | 61.11 |
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.