in reply to pushing into arrays of arrays
Previous post about using references was right on. As a side note, though, if you're pushing an array that you reuse in a loop, you'll want to create a new, anonymous array reference each time through. E.g.
while ( @array = somefunc() ) { push( @aoa, [ @array ] ); }
To your second question, yes, that should work.
-xdg
Code posted by xdg on PerlMonks is public domain. It has no warranties, express or implied. Posted code may not have been tested. Use at your own risk.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: pushing into arrays of arrays
by Anonymous Monk on Mar 05, 2004 at 12:24 UTC | |
by Crian (Curate) on Mar 05, 2004 at 12:37 UTC | |
by Anonymous Monk on Mar 05, 2004 at 12:46 UTC | |
by Anonymous Monk on Mar 05, 2004 at 12:58 UTC | |
by Tomte (Priest) on Mar 05, 2004 at 13:08 UTC | |
by Anonymous Monk on Mar 05, 2004 at 15:08 UTC | |
|