in reply to Re^3: Uninitialized Value
in thread Uninitialized Value

That’s a good way to bypass blank lines, but it won’t bypass a line containing only spaces, or a line containing “word” characters and/or digits but no colons. In both these cases, there is nothing to split on, so $field[1] is undefined. Rather than trying to test the line to predict whether $field[1] will be defined, a simpler and safer approach is to test for the condition causing the warnings directly:

next unless defined $field[1];

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Replies are listed 'Best First'.
Re^5: Uninitialized Value
by PilotinControl (Pilgrim) on May 18, 2015 at 18:14 UTC

    I've added that code as well...thanks!