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;
In reply to Re^2: Regex condition
by ikegami
in thread Regex condition
by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |