in reply to no of lines in uploaded text file

(Assuming \n is the EOL character).

use strict; use warnings; use 5.010; open my $fh, '<', 'path/to/my/file.csv' or die "Could not open file: $ +!"; my @whole_file = <$fh>; say 'Number of lines:', scalar @whole_file;
You can then of course use the data in the array to feed to methods of Text::CSV::Encoded so you do not have to read the file again. Of course if the file is really huge, you may run into memory problems.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James