#!d:\perl use CGI qw(:standard); $ip= param("IPNum"); print "Content-type:text/html\n\n"; print < DLS Peers

DLS Peer Information

Peers
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=; #chop ($ip); print "

IP number is $ip

"; # Split the IP # and get the third octet @octet=split(/\./,$ip); # print ("The third octet = $octet[2]"); $trd = $octet[2]; print "

The 3rd Octet is $trd

"; # 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 = ; print "

Peers Below

"; print @peers; @csv = (grep /^$trd/, @peers) or die "No such IP"; @ncsv = split(/,/, $csv[0]);