in reply to Help with array ref in hashes

Your loop looks ok, but maybe we need to see your dumper output:
use warnings; use strict; my %lengths = (c1 => {z => [1..5]}); for my $coord (keys %lengths) { for (@{ $lengths{$coord}{z} }) { print "$_\n"; } } __END__ 1 2 3 4 5

A good reference: