Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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.
Any suggestions?
This is my current code:
My check for NULL doesn't seem to work....while(<DATA>){ # Populate the data array if ($_ ne ""){ push @data, $_; } } close DATA; my $length = @data; print "LENGTH: $length\n";
Any suggestions?
Back to
Seekers of Perl Wisdom