in reply to Printing Random Image in HTML
Here's some code that will do the same job (hopefully):
open DAT, "ads.dat" or die "Can't open data file: $!"; my @valid = grep $_->[3] =~ /^internal|partner$/, map [ split /\|/ ], <DAT>; close DAT or die "Can't close data file: $!"; my $which = $valid[ rand @valid ]; print "Location: ", $which->[2], "\n\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Printing Random Image in HTML
by damian (Beadle) on Sep 13, 2000 at 11:25 UTC |