23 sub increm
24 { $mid = ($mi + $gap) % 60; }
You shouldn't define subroutines that only have side effects. In other words, increm() returns a value and you should use that returned value to assign to the variable $mid.
44 if (open CAC, "+>", "cache.html") {
You are only writing to the CAC filehandle so there is no point in opening the file for reading as well.
51 my $filetobecopied = "cache.html.";
52 my $newfile = "nmapresult.html.";
53 copy($filetobecopied, $newfile) or die "File cannot be cop
+ied.";
The file you opened is "cache.html" but the file you are trying to copy is "cache.html.", notice the difference in the file names.
40 chdir "$pathofnmap";
42 chdir "C:/Documents and Settings/Wxp/Documenti/pubz";
Like open() and copy() in your program, you should verify that chdir() worked correctly.
55 close NMAP;} else {die "Impossibile aprire Nmap $!\n"}}
When using close with a piped open you should verify that the filehandle closed correctly.
You may also want to peruse the style guide for tips on formatting your code. :)
| [reply] [d/l] [select] |