perlquestion
Anonymous Monk
Hello,
Is there an easier way to determine the length of a data file. The file I'm reading in has blank lines, that I DON'T want in my array.
<P>
This is my current code:
<code>
while(<DATA>){
# Populate the data array
if ($_ ne ""){
push @data, $_;
}
}
close DATA;
my $length = @data;
print "LENGTH: $length\n";
</code>
My check for NULL doesn't seem to work....<BR>
Any suggestions?
9