http://qs1969.pair.com?node_id=1176866


in reply to split problem

Please explain further what you intend to accomplish as an end result. Your code is actually fine albeit strange.
use strict; use warnings; use Data::Dumper; my $value = "A\tB\tC\tD\tE\tF\t\t\t\t"; my @flds; @flds = split(/\t/,$value); $flds[16] = undef; $flds[8] = 0; print Dumper \@flds; __END__ $VAR1 = [ 'A', 'B', 'C', 'D', 'E', 'F', undef, undef, 0, undef, undef, undef, undef, undef, undef, undef, undef ];
PS: I see other replies, I am using Perl 5.20 Could be a bug.