I am working on a Perl script to read CSV file and do some calculations. CSV file has only two columns, something like below.
One Two
1.00 44.000
3.00 55.000
You could use Tie::File module I believe. It looks like this loads the lines into an array, then you could get the size of the array and process arrayS-ze-1000 up to arraySize-1.
Tie::File
Another Option would be to count the number of lines in the file, then loop through the file once, and start reading in values at numberofLines-1000
$count = `wc -l < $file`;
die "wc failed: $?" if $?;
chomp($count);
That would give you number of lines (on most systems.