in reply to Exists and arrays
Thanks everyone for your replies
I was assuming that the initialization of elements 0 to 5 was implicitly done by perl.
From Learning Perl 5th Ed. If you store an array element that is beyond the end of the array, the array is automatically extended as needed - there's no limit on its length, as long as there's available memory for Perl to use. If Perl needs to create intervening elements, it creates them as undef values.
So this led me to expect that exists would work here while defined won't. Of course the dumper output doesn't help the confusion.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Exists and arrays
by JadeNB (Chaplain) on Oct 03, 2009 at 21:18 UTC |