#!/usr/bin/perl -w # random_image.pl # select an image at random # author: gregory c. wilcox # date: 3/24/2003 use warnings; use strict; use CGI::Carp qw(fatalsToBrowser); my $basedir = "http://blueridgebicycleclub.org/"; my @images = ( "roadride3.jpg", "RLG_0700_small.jpg", "RLG_0702_small.jpg", "RLG_0703_small.jpg", "RLG_0705_small.jpg", "lois_caesarhead_small.jpg", "willie_caesarhead_small.jpg", "mtb_waterxing_small.jpg", ); my $num = rand(@images); # select a random number # file header print "Content-type: text/html\n\n"; # HTML IMG tag provides URL of image print "\n"; # end of file