Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: telling script to read from next line

by ginocapelli (Acolyte)
on Jul 08, 2001 at 16:55 UTC ( [id://94824]=note: print w/replies, xml ) Need Help??


in reply to Re: telling script to read from next line
in thread telling script to read from next line

Thanks a lot. Here is what I am using and it is working fine:
#!/usr/bin/perl -wT use strict; use CGI; my $line = ""; my $part = ""; my $adfile = 'banners.dat'; open(FILE, $adfile) || die "Can't open $adfile"; #srand; # This chooses a random line, and puts that line into # the var $line. rand($.) < 1 && ($line = $_) while <FILE>; my @part = split(/\|/,$line); # Display the banner 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"; # Close the file close(FILE);
Thanks to everyone who repsonded to this.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://94824]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-24 04:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found