in reply to Matching and removing a line from a file

my $exclude = "$input{'FName'}, $input{'LName'}, $input{'county'}"; my @excludes = split (/ /,$exclude);

That should probably be written as:

my @excludes = @input{ 'FName', 'LName', 'county' };