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)