in reply to Re: Multi-Dimensional Arrays and Array References
in thread Multi-Dimensional Arrays and Array References
Hi choroba,
Thank you very much for your reply. If I may trouble you a bit more, I have a few more questions:
1. When should I store my data in a reference such as
my $ref = [[1, 2, 3], [4, 5, 6]];versus an array
my @array = ([1, 2, 3], [4, 5, 6]);What is the difference?
2. In both your first example using the reference, how come $ref->[$_] can’t be written as $ref[$_]?
Gratias tibi ago
Leudwinus
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Multi-Dimensional Arrays and Array References
by hippo (Archbishop) on Nov 16, 2020 at 18:49 UTC | |
|
Re^3: Multi-Dimensional Arrays and Array References
by Leudwinus (Scribe) on Nov 16, 2020 at 18:11 UTC | |
by AnomalousMonk (Archbishop) on Nov 16, 2020 at 19:38 UTC | |
by Leudwinus (Scribe) on Nov 16, 2020 at 21:28 UTC |