in reply to Re: What's going on in array element assignment?
in thread What's going on in array element assignment?
So print $rocks[$#rocks]; is printing nothing because the last element is undef?$rocks[0] = 'bedrock'; $rocks[1] = 'slate'; $rocks[2]= 'lava'; $rocks[3] = 'crushed rock'; $rocks[99] = 'schist'; $#rocks = 2; $#rocks = 99; print $rocks[$#rocks];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: What's going on in array element assignment?
by perlfan (Parson) on Aug 11, 2020 at 03:20 UTC | |
by Athanasius (Archbishop) on Aug 11, 2020 at 07:15 UTC | |
by zapdos (Sexton) on Aug 12, 2020 at 04:37 UTC | |
by Athanasius (Archbishop) on Aug 12, 2020 at 06:24 UTC | |
by zapdos (Sexton) on Aug 12, 2020 at 06:33 UTC | |
by zapdos (Sexton) on Aug 11, 2020 at 03:25 UTC |