my @array = qw(foo bar); my %hash = @array; while (my ($attrib, $value) = each (%hash) ) { print "$attrib=$value\n"; }