#!/usr/bin/perl

# Define Variables
$basedir = "monty2";
@images = 
("first.html","second.html","third.html");
@alt = ("first","second","third");

# Done
##############################################################################

srand(time ^ $$);
$num = rand(@images); # Pick a Random Number

# Print Out Header With Random Filename and Base Directory
print "Content-type: text/html\n\n";

print "<img src=\"$basedir$images[$num]\"";
if ($alt[$num] ne "") {
   print " alt=\"$alt[$num]\"";
}

print "\n";
