http://www.perlmonks.org?node_id=667497


in reply to Ignorance Isnt Always Bliss

One thing I often find useful for figuring out what error messages mean is perldoc perldiag, which contains somewhat helpful, albeit very brief, explanations for each error message. Or you can just add "use diagnostics" at the top of your source.

Although they won't usually have enough information to tell you exactly what happened, in this case, the description in perldiag might have pointed you in the right direction. It reads:

You tried to make an array value spring into existence, and the subscript was probably negative, even counting from end of the array backwards.

Which might have pointed you to the fact that your problem involved doing something to an array that had not been created, or a negative subscript.