#!/usr/bin/perl -wT use strict; my $adfile = 'banners.dat'; open FILE, "< $adfile" or die "Can't open $file: $!\n"; my @lines; splice(@lines, rand $., 0, $_) while ; close FILE; chomp @lines; print "Content-Type: text/html\n\n"; for my $line (@lines) { my @parts = split '\|', $line; print <<__End__; __End__ }