for (keys(%{$ini{$hostnames[$i]}})) { push @slots,$_; push @ifindices,${$ini{$hostnames[$i]}}{$_}; }