|
|
| No such thing as a small change | |
| PerlMonks |
index wrapping in tied FETCH and EXISTSby cmac (Monk) |
| on Feb 04, 2009 at 08:05 UTC ( [id://741212]=perlquestion: print w/replies, xml ) | Need Help?? |
|
cmac has asked for the wisdom of the Perl Monks concerning the following question:
Where does perl get off wrapping around to the top of the array in a $val = $tiedArray[$i] or if (exists $tiedArray[$i])... if $i happens to be negative?? This behavior is acknowledged here. If I am doing some kind of subscript computation and my subscript happens to go negative, I want to know about it (by receiving undef) NOW, rather than being given some completely unrelated value from the other end of the array! Fooey! cmac www.animalhead.com
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||||||||