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. :)


In reply to Re: ypne by jwkrahn
in thread ypne by LordScinawa

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.