for my $control (keys %{ $dialog->{attributes} }) { my $val = $dialog->{attributes}{$control}; if (ref $val eq 'ARRAY') { print "@$val"; } else { print $val; } }