$ perl -MData::Dumper -e'@a = map $_//"NA", split /\t/, "foo\t\tbar"; print Dumper \@a' $VAR1 = [ 'foo', '', 'bar' ];