in reply to Re^6: Using exists to check element in array
in thread Using exists to check element in array
And it's obviously inconsistent to delete and exists
That's what I've been saying. exists isn't consistent. That's why there's a warning. And you're right, delete isn't either. We've proved this so many times already!
keys is inconsistent to the behavior in hashes
Next you'll say that scalar(@a) and scalar(%h) are inconsistent!
Perl doesn't have sparse arrays. If $y[3] is in the array, so is $y[2].
keys returns the elements found the structure for both arrays and hashes. keys is consistent for both arrays and hashes.
Only exists and delete are inconsistent, as repeatedly demonstrated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Using exists to check element in array
by ikegami (Patriarch) on Feb 01, 2024 at 18:04 UTC | |
|
Re^8: Using exists to check element in array
by LanX (Saint) on Feb 03, 2024 at 21:55 UTC | |
by ikegami (Patriarch) on Feb 04, 2024 at 03:39 UTC |