- or download this
A hash or array element can be true only if it's defined and defined o
+nly if it exists, but the reverse doesn't necessarily hold true.
- or download this
exists may also be called on array elements, but its behavior is much
+less obvious and is strongly tied to the use of delete on arrays.
WARNING: Calling exists on array values is strongly discouraged. The n
+otion of deleting or checking the existence of Perl array elements is
+ not conceptually coherent, and can lead to surprising behavior.
- or download this
#!/usr/bin/perl
use strict;
...
undef,
2
];