for my $key (keys %coords) { print "$key =>\n"; for my $x_coord (@{$coords{$key}}) { print " $x_coord\n"; } }