BTW, AFAICT, split /\t/ on two consecutive tabs wouldn't return undef, but rather '' (the empty string):
$ perl -MData::Dumper -e'@a = split /\t/, "foo\t\tbar"; print Dumper \
+@a'
$VAR1 = [
'foo',
'',
'bar'
];
So the whole "//" thing is moot anyway. It wouldn't even work:
$ perl -MData::Dumper -e'@a = map $_//"NA", split /\t/, "foo\t\tbar";
+print Dumper \@a'
$VAR1 = [
'foo',
'',
'bar'
];
In other words, you probably want:
$ perl -MData::Dumper -e'@a = map $_ ne "" ? $_ : "NA", split /\t/, "f
+oo\t\tbar"; print Dumper \@a'
$VAR1 = [
'foo',
'NA',
'bar'
];