damian has asked for the wisdom of the Perl Monks concerning the following question:
any suggestions? forgive me for being so lame, i'm a newbie. thanks in advance.if(!open DAT, "ads.dat") { print "Error: cannot open data file!\n"; exit 1; } else { @imgdata=<DAT>; close DAT; foreach $c (@imgdata) { ($id,$image,$url,$from,$to,$type,$numshow,$numclicks,$desc)=split( +/\|/,$c); if ($type=~/^internal|partner$/) { push (@imgs,$image); push (@urls,$url); } } $img = $imgs[int(rand($#imgs+1))]; $link = $urls[int(rand($#urls+1))]; print qq|Set-Cookie: URL=$link\n|; print qq|Location: $img\n\n|; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Tracking images printed on HTML
by chromatic (Archbishop) on Sep 14, 2000 at 07:31 UTC | |
|
Re: Tracking images printed on HTML
by jptxs (Curate) on Sep 14, 2000 at 09:30 UTC | |
|
Re: Tracking images printed on HTML
by little (Curate) on Sep 14, 2000 at 13:40 UTC | |
|
Re: Tracking images printed on HTML
by Anonymous Monk on Sep 15, 2000 at 01:57 UTC |