Perl source and tests have had all use of 'exists' on array elements / array refs removed. So running exists on an array element can lead to surprising behavior - because no one is testing what the behavior should be. So essentially the maintainers are reserving the right to modify this behavior by accident.
This situation seems to have come about because originally "exists" on array elements returned true if Perl had allocated a CV pointer for that index, where as now it returns True only if a CV pointer is both allocated and is not set to null. But this change over was not clean and and I think there are situations where it would not always be true. Imagine an array that is extremely large and fragmented in its use of indexes, where memory allocation has trimmed, extended, realloacted various CV linked lists etc. Does perl always only have a CV for each actually 'used' index position? The answer is apparently no.In reply to Re: Using exists to check element in array
by sectokia
in thread Using exists to check element in array
by david
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |