while(){ # Populate the data array if ($_ ne ""){ push @data, $_; } } close DATA; my $length = @data; print "LENGTH: $length\n";