The list also has 2 splice versions port-state-service+IP-mem-list-splice.pl and port-state-service+IP-mem-list-splice-xtra.pl
As in the above port-state-service+IP-mem-list-splice.pl delete ONLY the index item while port-state-service+IP-mem-list-splice-xtra.pl delete items between interveining line numbers from the port.txt file
port-state-service+IP-mem-list-splice.pl calls splice on list @IP this one REALLY caused be headeachs as is I was struggling with a moving target, @IP when calling splice so I have created $w $x $y $z variable to deal with this,which finally works, but NOT WITHOUT effort !
I have done port-state-service+IP-mem-list-direct.pl from port-state-service+IP-mem.pl (now renamed port-state-service+IP-mem-array.pl) changing $IP[$line_no++] = for push @IP, at line 8
I have done port-state-service+IP-mem-hash-direct.pl from port-state-service+IP-mem.pl (now renamed port-state-service+IP-mem-array.pl) changing $IP[$line_no++] for $IP{$line_no++} at line 8 and changing $IP[$line_no - 1] for $IP{$line_no - 1} at line 16
Finally, the plain array version port-state-service+IP-mem-array.pl leaves the array untouched

A few words on the contreversial goto version port-state-service+IP-disk-goto.pl
I have posted 11141855 on "how to return from a goto ?" but got no replies as an instruction/statement/command that would allow me to return FROM WITHIN the label,the only reply I got was to goto sub using a subroutine,but this is not a label and is alread listed here (port-state-service+IP-disk-sub.pl)
I have Google searched for a perl statement to get out of a goto label and resume where it left off and I have read a few files about the goto statement all URLs uploaded here http://bitcoinshell.mooo.com/users/p3rl/URL-00.html but nothing satisfactory
I have made port-state-service+IP-disk-goto.pl out of port-state-service+IP-disk.pl now renamed port-state-service+IP-disk-sub.pl replacing the subroutine call &get_IP with goto get_IP AND replacing the subroutine with a label
Althought both programs work fine I m a bit concerned about the above warning messages for jumping in the middle of a while I have fixed this from the outside (shell) using perl port-state-service+IP-disk-goto.pl ports.txt IP.txt output.txt 2> /dev/null redirecting STDERR to /dev/null
using the 2> bash shell operator
I have even tested with a large list of IPs in addition to those listed on 11129698 under "IP file WITH SPACEs/TABs and empty NEWLINEs", "IP file WITHOUT SPACEs/TABs and empty NEWLINEs" and "and get the IP corresponding to the nth", "I have tested different forms of Nth IPs with different number of leading '0's (IP port)" for the purpose of port-state-service+IP-disk-goto.pl (warnings being thorws up to STDERR) and port-state-service+IP-mem-list-splice-xtra.pl delete items between interveining line numbers in the @IP list and both work fine (see output file below)


In reply to Re: can't read the 2nd input file;12 new versions of PORT-STATE-SERVICE+IP;14 in all;3 disk,11 memory (part 2) by perl_boy
in thread can't read the 2nd input file by perl_boy

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.