in reply to Getting individual lists from a bigger list
Are you sure the logic is right? You would be pushing the same @tempList onto @bigList in each iteration of the loop. I would expect it more like this:
<LOOP HERE> { @tempList = <obtained in another part of the code> push(@bigList, @tempList); }
Also if you push it this way, you do not get a list of lists, Perl will flatten everything into one big list. You need to push a reference to a list onto the @BigList. If you re-use @tempList, then you also need to copy the array, otherwise you overwrite previous results. So I would propose something like:
push @BigList, [ @tempList ];
which creates a reference to a copy of @tempList.
UPDATE: To access this structure, you would say $BigList[2]->[5] to access the third small list's sixth element (counting starts at zero).
|
|---|