http://www.perlmonks.org?node_id=832076


in reply to "Use of uninitialized value" due to empty elements in an array

Tell split not to remove empty trailing fields.
my @line_split = split(/\t/, $line, -1);
And if you want, you can check if you got enough fields
if (@line_split != 3) { die("Not enough fields in line $.\n"); }

Replies are listed 'Best First'.
Re^2: "Use of uninitialized value" due to empty elements in an array
by michaelp (Initiate) on Mar 31, 2010 at 17:28 UTC
    Thanks for all the help!