ginocapelli has asked for the wisdom of the Perl Monks concerning the following question:
and here is what the data file looks like:$adfile = 'banners.dat'; open(FILE, $adfile) || die "Can't open $adfile"; $file = <FILE>; close(FILE); @stuff = split(/;/,$file); srand(time ^ $$); $choice = rand(@stuff); $chosen = @stuff[$choice]; @part = split(/\|/,$chosen); print "Content-type: text/html\n\n"; print "<font face=\"arial\" size=\"2\"><a href=\"@part[0]\" target +=\"_blank\"><img src=\"@part[1]\" width=\"@part[2]\" height=\"@part[3 +]\" alt=\"@part[4]\" border=\"1\"><br>Please visit my sponosr! </a></ +font>\n";
I don't want a huge line of code for all the banners that will be displayed. Instead, I would line to enter the info like this:http://www.whatever.com|whatever.gif|468|60|whatever;http://www.okay.c +a|okay.gif|468|60|okay
How can I do this? Anyone? Thanks!http://www.whatever.com|whatever.gif|468|60|whatever http://www.okay.ca|okay.gif|468|60|okay
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: telling script to read from next line
by andreychek (Parson) on Jul 08, 2001 at 05:19 UTC | |
by ginocapelli (Acolyte) on Jul 08, 2001 at 16:55 UTC | |
by Anonymous Monk on Jul 08, 2001 at 16:52 UTC | |
|
Re: telling script to read from next line
by Zaxo (Archbishop) on Jul 08, 2001 at 05:56 UTC | |
|
Re: telling script to read from next line
by tomhukins (Curate) on Jul 08, 2001 at 15:28 UTC | |
|
Re: telling script to read from next line
by I0 (Priest) on Jul 08, 2001 at 10:16 UTC | |
by tomhukins (Curate) on Jul 08, 2001 at 15:33 UTC |