in reply to Re^3: Can an element be created because it was accessed ?
in thread Can an element be created because it was accessed ?
That wont work if the array is intentionally sparse.
This is not a supported "feature". It's the side effect of a bug in exists.
But my fix was wrong. (I've been fixing uses of exists to check if an element exists.) It should be
if ( defined( $this->{N}[$1] ) ) { my $testedNVal = $this->{N}[$1]{Val}; ... }
And in all likelyhood, the following would also do the trick:
if ( $this->{N}[$1] ) { my $testedNVal = $this->{N}[$1]{Val}; ... }
|
|---|