in reply to Hash value printing... WITH ARRAYS *dun dun dun*
use 5.010; my $hash = { array_key => ['one', 'two', 'three'], scalar_key => 'four', }; while (my ($key, $value) = each %$hash) { foreach my $element ("ARRAY" eq ref $value ? @$value : $value) { say "($key, $element)" } }
|
|---|