in reply to How do I find the total number of lines in a file?

Try:
my $total = @{[<FILE>]}; print $total,"\n";