in reply to Use of uninitialized value $data

I was about to make the same suggestions as Corion did, only I am typing slower. Here's one more possible input: If you have an empty input line, i.e. a line which contains only a newline "\n", you get the same warnings.

And, of course, you should closely inspect chunk 2147 of your input file.