Help for this page
open DAT, "ads.dat" or die "Error: cannot open data file: $!\n"; ... $img = $imgs[int(rand($#imgs+1))]; print "Location: $img\n\n";
s/^ # Beginning of string [^|]+ # Everything up to the next bar ... partner # the string "partner" )$ # End of string /$1/x # Substitute $1 for string