I ran podchecker on your program and received these messages:
$ podchecker 747546.pl *** WARNING: line containing nothing but whitespace in paragraph at li +ne 34 in file 747546.pl *** ERROR: =item without previous =over at line 130 in file 747546.pl *** WARNING: line containing nothing but whitespace in paragraph at li +ne 141 in file 747546.pl *** ERROR: Spurious text after =cut at line 135 in file 747546.pl *** WARNING: line containing nothing but whitespace in paragraph at li +ne 158 in file 747546.pl *** ERROR: Spurious text after =cut at line 156 in file 747546.pl *** ERROR: =item without previous =over at line 360 in file 747546.pl *** WARNING: line containing nothing but whitespace in paragraph at li +ne 378 in file 747546.pl *** ERROR: Spurious text after =cut at line 372 in file 747546.pl *** WARNING: line containing nothing but whitespace in paragraph at li +ne 485 in file 747546.pl *** ERROR: Spurious text after =cut at line 480 in file 747546.pl *** ERROR: =item without previous =over at line 527 in file 747546.pl *** WARNING: line containing nothing but whitespace in paragraph at li +ne 533 in file 747546.pl *** ERROR: =item without previous =over at line 716 in file 747546.pl *** WARNING: line containing nothing but whitespace in paragraph at li +ne 719 in file 747546.pl *** WARNING: line containing nothing but whitespace in paragraph at li +ne 721 in file 747546.pl *** ERROR: Spurious text after =cut at line 787 in file 747546.pl 747546.pl has 9 pod syntax errors.
Then I ran the compiler on it and got a syntax error:
$ perl -c 747546.pl syntax error at 747546.pl line 681, near "next "
Because you are missing a semicolon on the previous line.
191: open(CACHE_FH," < $cache"); 212: open(F,">$cache"); 425: open(FILE, ">$cache"); 677: open(CACHE_FH, "< $cache"); 700: open(F,">$cache");
Also, you should verify that open succeeded before you try to use a possibly invalid filehandle.
Update
411: stdout::debug("BroadcastPing: Read $#lines lin +es from $cache\n"); 421: stdout::debug("BroadcastPing: Writing $#keys l +ines to $cache\n"); 926: stdout::debug("read_arptable(): ARP Read: Read + $#lines lines from $arp_cachefile\n");
The variables $#lines and $#keys do not contain the number of lines, they contain the last index of the arrays @lines and @keys. You need to use the array in scalar context to get the correct number:
stdout::debug("BroadcastPing: Read " . @lines +. " lines from $cache\n"); stdout::debug("BroadcastPing: Writing " . @key +s . " lines to $cache\n"); stdout::debug("read_arptable(): ARP Read: Read + " . @lines . " lines from $arp_cachefile\n");
In reply to Re: Class-C subnet discovery/scanner
by jwkrahn
in thread Class-C subnet discovery/scanner
by jbryan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |