#!/usr/bin/perl

# Define Variables
$basedir = "http://mnstats.morris.umn.edu/courses/math1601/cgi-bin/coin/picts/";
@images = ("headbig.gif","tailbig.gif");
@alt = ("head","tail");

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


