## each missed field is placed in a new array for my $i(@required) { chomp $i; if (!$FORM{$i}) { push @missed_fields, $i; } }