%frq_node = (); # Each hash entry will have a key corresponding to an interface # Each value is an array of 2 elements; element 0 is a hash # with each hash key being the timeout value of a ping send # and the value being the number of pings for that hash # value. element 1 is the number of received pings # open file code here while () { if (/sending ping/) { # Extract interface key from line into $key # Extract the timeout value in sending ping $to # Increment the hash value of the corresponding # timeout bucket for the interface ${$frq_node{$key}[0]}{$to}++; # Does not work } elsif (/recevied ping response) { # Increment # of received pings for interface $frq_node{$key}[1]++; # Works fine! } }