for $key (keys %$arrays){ for $element (@{$arrays->{$key}}){ print $element; } }