sgowrish has asked for the wisdom of the Perl Monks concerning the following question:
sub _Load_IP { if(! open (PATH_FILE_FH, "$Path_File")) { print "Failed to Open input PATH_REPORT File: $Path_File\n"; exit 1; } while(<PATH_FILE_FH>) { my $data =$_; chomp($data); my($pname,@val) = split(/\s+/,$data); my($Starpnt,$Endpnt) = split(/_/,$pname); $key = $Startpnt; #$IP_hash{$key} .= exists $IP_hash{$key} ? map{$IPcountList{$_}++ }" +@val" : @val; $IP_hash{$key} .= "@val"; } close(PATH_FILE_FH); } #End of _Load_IP()
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tally up the number of times each IP shows up in the file and load into HASH
by borisz (Canon) on Jan 20, 2009 at 21:57 UTC | |
by sgowrish (Initiate) on Jan 21, 2009 at 01:22 UTC |