#!/usr/local/bin/perl

# initialize random number seed
srand(time);

# build array of pages
opendir(DIR, './Pages');
@PAGES = readdir(DIR);
closedir(DIR);
@PAGES = grep(/^.*\.html/i, @PAGES);

# pick a page at random
$PAGE = $PAGES[rand @PAGES];

# print out the redirect
print "Location: http://www.leftfield.org/ToadHead/Pages/" . $PAGE . "\n\n";
