#!/usr/bin/perl -wT use strict; use CGI; my $line = ""; my $part = ""; my $adfile = 'banners.dat'; open(FILE, $adfile) || die "Can't open $adfile"; #srand; # This chooses a random line, and puts that line into # the var $line. rand($.) < 1 && ($line = $_) while ; my @part = split(/\|/,$line); # Display the banner print "Content-type: text/html\n\n"; print "\"@part[4]\"
Please visit my sponosr!
\n"; # Close the file close(FILE);