foreach my $img ( sort keys %images ) { foreach ( @{$images{$img}} ) { # this is line 11 ... #### 'intra-d_1050044970' => { 'frags' => [ .... #### foreach my $img ( keys %images ) { foreach my $typ ( keys %{$images{$img}} ) { ... # next layer -- content of $images{$img}{$typ} -- depends on value of $typ: ... # 'frac' has AoAoH ... # others have just a hash