#!/usr/bin/perl

# Define Variables
#$basedir = "http://mnstats.morris.umn.edu/courses/math1601/public/test/dice/picts/";
$basedir = "./picts/";
@images = ("die2s.gif","die4s.gif","die6s.gif");
@alt = ("two","four","six");

# 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";


