#!/usr/bin/perl -l $dialog->{attributes}{control1} = "abc"; $dialog->{attributes}{control2}[0] = "cde"; $dialog->{attributes}{control2}[1] = "fgh"; for my $control (keys %{ $dialog->{attributes} }) { if (ref $dialog->{attributes}{$control} eq 'ARRAY') { print "@{ $dialog->{attributes}{$control} }"; } else { print $dialog->{attributes}{$control}; } } __END__ abc cde fgh