in reply to Re^4: Mapping & Hash Issues
in thread Mapping & Hash Issues

First, <code> tags are easy to use. When you're entering your post, type something like this:
<code>
for my $i (1 .. 10) { print "And a $_,\n"; }
</code>

And it will come out looking nice. If you leave off the <code> and </code>, it will be all jumbled together and people will yell at you. Also, instead of typing a row of equal signs like you've been doing, you can instead use <hr>, which stands for horizontal rule.

Second, as runrig says, there's probably something weird in your input file. Try looking at line 1840. Try making a smaller input file to make testing easier.

Replies are listed 'Best First'.
Re^6: Mapping & Hash Issues
by Anonymous Monk on Mar 29, 2017 at 17:58 UTC
    The record number (1840) is inaccurate because it's counting the map file as well. You might want to put this line just above the start of the second while loop:
    $csv = Text::CSV->new({ auto_diag=>1, binary=>1, eol=>"\n" });
    (Yes, that's almost a copy of a previous line, but note that the my is missing.)