%hash = map {$_ => undef } qw(city state country); #### ( 'city' => undef, 'state' => undef, 'country' => undef ) #### my %skip = map {$_ => undef } qw(city state country); foreach my $field (param) { next if exists $skip{$field}; foreach my $value (param($field)) { #process non blank thedata variable ... } } #### foreach my $field (param) { next if grep { $field eq $_ } qw(city state country); foreach my $value (param($field)) { #process non blank thedata variable ... } }