note
JavaFan
<c>$line_split[0]</c> will only be undefined if <c>$line</c> doesn't contain any other character than <c>\t</c> (including being empty). And the fact it's undefined stems from <c>@line_split</c> not having any entries. So, you may do something like:
<code>
if (@line_split && $line_split[0] eq "") {
# Has empty leading fields
}
</code>
or
<code>
if (!@line_split || $line_split[0] eq "") {
# Has empty leading fields, or no fields at all
}
</code>
depending on what you want to do if there are no fields at all.
832047
832047