in reply to NEWBIE: Can someone explain this error?

It means that, sometime after reading the 1807th record (chunk == record, or is that 'eq'?), there was an uninitialized value. Did you set $/ to something other than the default? If not, chunk == line of input file.

My guess is that you have a:

while (<INFILE>) { my $foo =~ s/blah/bar/; # anything goes here }
in your code around line 41 that is choking on some input.