foreach my $group (keys %no_priv_matches) { print "New interconnects for $group are:\n"; foreach (@{$no_priv_matches{$group}}) { print "\t".join(",",@{$no_priv_matches{$group}})."\n"; } }