in reply to Regex condition
my @fields = split /\t/, $_; [download]
You forgot to remove the trailing newline. (Note the \n in the OP's regex.)
chomp; my @fields = split /\t/, $_; [download]
And if you want to keep empty trailing fields, you'll need to specify the third parameter.
chomp; my @fields = split /\t/, $_, -1; [download]