Problem was with some filenames in Windows which were causing trouble...
Not_a_Number, I've added the "or die" clause, hopefully it will catch such problematic file names.
Thanks,
Adam.
I've been playing around with Parse::CSV for a simple case of comparing two files – meaning I'd like to re-use the instance of the module.
The second instantiation of the object results in an empty ARRAY reference…
Am I missing something obvious or is there another way of going around this?
sub get_line {
my ($file, $row_num) = @_;
my $parser = Parse::CSV->new(
file => $file,
);
while ( my $value = $parser->fetch ) {
if ($parser->row() == $row_num) {
return $value;
}
....
Thanks,
Adam.