my @missing; foreach my $f (@fields) { if ($account{$f} eq undef) { push(@missing, @acct_fields{$f}); } }