in reply to Re^2: Declaring and checking content of variables with consecutive names
in thread Declaring and checking content of variables with consecutive names
That approach would suffer from exactly the same problems as consecutively enumerated scalar variables. Perl has arrays of arrays so this is easily avoided by having just one single outer array each of whose elements are themselves an array. That way your code could declare just one @arr and then index into it for individual subarrays or within them for individual values.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Declaring and checking content of variables with consecutive names
by rflesch (Novice) on Sep 29, 2016 at 09:37 UTC | |
by hippo (Bishop) on Sep 29, 2016 at 10:01 UTC | |
by rflesch (Novice) on Sep 29, 2016 at 10:12 UTC | |
by hippo (Bishop) on Sep 29, 2016 at 10:41 UTC | |
by choroba (Cardinal) on Sep 29, 2016 at 16:37 UTC |
In Section
Seekers of Perl Wisdom