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, |
In reply to Re^4: Uninitialized Value
by Athanasius
in thread Uninitialized Value
by PilotinControl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |