RE: Array madness

2011-10-18 Thread Barry Brevik
Ah, I see. Yes, that had eluded me. > Here you are flattening the @$record into @toparray. If you > wanted to keep the nested array structure, you would have to > push the array reference instead: > > push @toparray, $record; > > Or if for whatever reason you must create a copy of the d

RE: Array madness

2011-10-18 Thread Jan Dubois
On Tue, 18 Oct 2011, Barry Brevik wrote: > > I've been fooling around with this situation entirely too long. Below is > a demonstration of the problem, but the real situation is part of some > Win32::OLE code I am maintaining, so it's relevant . > > The problem is this: the 1st loop pushes each s

Array madness

2011-10-18 Thread Barry Brevik
I've been fooling around with this situation entirely too long. Below is a demonstration of the problem, but the real situation is part of some Win32::OLE code I am maintaining, so it's relevant . The problem is this: the 1st loop pushes each sub-array (for example "39", "3") onto @toparray. A pr