foreach my $key ( keys %{ $data{$formname}[0] } ) { print $key, " ", $data{$formname}[0]{$key}, "\n"; }