in reply to Re^2: Matching and removing a line from a file
in thread Matching and removing a line from a file
Oops, I was rushed when I wrote that.
While $_ eq $entry should still be used, it should be after extracting the fields.
orwhile (<>) { my @fields = split /,/; # Text::CSV_XS would be better. next if $field[0] eq $input{FName} || $field[1] eq $input{LName} || $field[3] eq $input{county}; print; }
while (<>) { my @fields = split /,/; # Text::CSV_XS would be better. next if $field[0] eq $input{FName} && $field[1] eq $input{LName} && $field[3] eq $input{county}; print; }
depending on what the OP wants.
|
|---|