in reply to File length ??
That is assuming that blank lines may or may not include spaces. If you know that they will not, you could save yourself a good deal of time (especially for large files) by simply testing $_ ne "" in the grep.@data = grep { $_ !~ /^\s*$/ } @a; my $length = scalar @data;
|
|---|