I am expecting after the assignment in the second line, the array should consists of four elements #0-3, and "exists" should return true for all of them. However, "exists" only returns true for element #3. Why? Have I missed something?my @array; $array[3] = 2; for my $i (0..5) { say $i . ": " . (exists $array[$i]); }
In reply to Difference between exists and defined by milanpwc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |