#! /usr/local/bin/perl # Necessary Variables $basedir = "http://autopedia.com/Hyund/"; @files = ("97Tibur1.jpg","97Tibur2.jpg","97Tibur3.jpg","97Tibur4.jpg"); # Options $uselog = 0; # 1 = YES; 0 = NO $logfile = "/logs/HyundLog"; srand; $num = rand(@files); # Pick a Random Number # Print Out Header With Random Filename and Base Directory print "Location: $basedir$files[$num]\n\n"; # Log Image if ($uselog eq '1') { open (LOG, ">>$logfile"); print LOG "$files[$num]\n"; close (LOG); } exit;