As a general rule, perl error messages try to be as short as possible while still conveying all of the neccessary info that sets *this* type of error apart from *that* type of error.
The main motivation for this (as i understand it) is to keep them short for people who allready understand the various classes of problems, and just need a quick pointer to the line number and the type of think they screwed up.
If/when people are confused by perl error messages, they should ALWAYS consult perldiag, or use diagnostics
laptop:~> perl -Mdiagnostics -e 'my @x; $x[-1]->meth' Modification of non-creatable array value attempted, subscript -1 at - +e line 1 (#1) (F) You tried to make an array value spring into existence, and th +e subscript was probably negative, even counting from end of the arr +ay backwards. Uncaught exception from user code: Modification of non-creatable array value attempted, subscript + -1 at -e line 1.
In reply to Re: Negative array subscript method call bug?
by hossman
in thread Negative array subscript method call bug?
by BUU
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |