1|/pics/boy.gif|http://www.b.com|internal 2|/pics/gal.gif|http://www.g.com|partner 3|/pics/gol.gif|http://www.f.com|payed #### if(!open DAT, "ads.dat") { print "Error: cannot open data file!\n"; exit 1; } else { @imgdata=; foreach $c (@imgdata) { ($id,$image,$url,$type)=split(/\|/,$c); if ($type=~/^internal|partner$/) { srand(time() ^ ($$ + ($$ << 15)) ); @imgs = ($image); $img = $imgs[int(rand($#imgs+1))]; print "Location: $img\n\n"; } } } }