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
The modules are the way to go. However, sometimes you may be writing a piece of code that you want to run on a variety of machines that may be missing the more obscure CPAN modules. In that case why not just 'tail' and dump the output to a temp file from within Perl?
#!/usr/bin/perl
`tail --lines=1000 /path/myfile.txt > tempfile.txt`
You then have something that isn't dependent on a CPAN module if installing one may present an issue.