ucanflyit has asked for the wisdom of the Perl Monks concerning the following question:
#!d:\perl use CGI qw(:standard); $ip= param("IPNum"); print "Content-type:text/html\n\n"; print <<WEB_PAGE; <html> <title>DLS Peers</title> <body> <h1>DLS Peer Information</h1> <table border=1 width=40%> <tr><th>Peers</th></tr> </table> WEB_PAGE # IP number is now passed to this script via the dslentry.htm form #print ("DLS Peer Table"); #print ("Enter Circuitless IP #\t"); #$ip=<STDIN>; #chop ($ip); print "<h3>IP number is $ip</h3>"; # Split the IP # and get the third octet @octet=split(/\./,$ip); # print ("The third octet = $octet[2]"); $trd = $octet[2]; print "<h3>The 3rd Octet is $trd</h3>"; # Build csv Array # Open the dls txt file and search for the 3rd octet $dir = "/cgi-bin/dls.txt"; open(PEERS, $dir) or print "Can't open File"; @peers = <PEERS>; print "<h3>Peers Below</h3>"; print @peers; @csv = (grep /^$trd/, @peers) or die "No such IP"; @ncsv = split(/,/, $csv[0]);
jdporter - added code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Opening files on IIS
by NetWallah (Canon) on Mar 08, 2004 at 23:56 UTC | |
by ucanflyit (Initiate) on Mar 09, 2004 at 20:51 UTC | |
|
Re: Opening files on IIS
by AcidHawk (Vicar) on Mar 09, 2004 at 05:54 UTC | |
by ucanflyit (Initiate) on Mar 09, 2004 at 20:51 UTC |