I'm keying my hash on $if_name, not $network_if, because $if_name should be equivalent to one member of @tcp_utilization_metrics, which I use to loop through each value in the hash. Please notice that $if_name is assigned the same value as $network_if at the top of the loop, but $network_if is the variable whose value is changed during the loop.