foreach my $network (keys %urls) { foreach my $key (keys %{$urls{$network}}) { print "$key
"; } } #### foreach my $network (values %urls) { foreach my $key (keys %$network) { print "$key
"; } }