in reply to Re: Regex condition
in thread Regex condition

You forgot to remove the trailing newline. (Note the \n in the OP's regex.)

chomp; my @fields = split /\t/, $_;

And if you want to keep empty trailing fields, you'll need to specify the third parameter.

chomp; my @fields = split /\t/, $_, -1;