vishi has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
I'm sure this may have been asked earlier but I searched quite a bit for this and am unable to find something that matches my requirement.
Ok Here is the deal - I have an empty list to start with, say @bigList, to which I keep pushing smaller lists - in a loop. Essentially, when the loop finishes, the @bigList list will now be a list of lists, like so:
@tempList = <obtained in another part of the code> <LOOP HERE> { push(@bigList, @tempList); }
Now, later on in the code, I want to retreive the individual lists that I pushed into @bigList, how do I do this? I read about dereferencing, and getting the reference of the array, but I end up getting the reference of @bigList and not the individual arrays.
Tried the following:
Help!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting individual lists from a bigger list
by hdb (Monsignor) on Jul 04, 2013 at 07:48 UTC | |
|
Re: Getting individual lists from a bigger list
by Loops (Curate) on Jul 04, 2013 at 07:57 UTC | |
|
Re: Getting individual lists from a bigger list
by poj (Abbot) on Jul 04, 2013 at 10:13 UTC | |
|
Re: Getting individual lists from a bigger list
by locked_user sundialsvc4 (Abbot) on Jul 05, 2013 at 02:11 UTC |