@str = qw( 7 house network_name 4 6); //<--example of data if($myhash {$str2}}){ // if netowrk_name is found increment the values of 3 and 4 } else{ //must be new so ad new data to hash }