I started to write this...
It doesn't. perl can't even make it that far because it can't figure out what it is you are trying to call "meth" on. Before it ever even gets arround to trying, it has to "make an array value spring into existence" and when it tried, it found that "subscript -1" ment "the subscript was (probably) negative" so ultimately you were asking it to set (aka: modify) a "non-creatable array value"
...but then i started to see your point: "Modification" ? why is refrencing the (non-creatable) array value to call a method on it considered a modification?
It would make more sense to say something like "Reference of non-creatable array value attempted"...
laptop:~> perl -e '$y = \$x[-1000];' Modification of non-creatable array value attempted, subscript -1000 a +t -e line 1.
In reply to Re^3: Negative array subscript method call bug?
by hossman
in thread Negative array subscript method call bug?
by BUU
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |