Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to do something like this;
but I end up withpush(@array,@stuff) push(@array,@morestuff) ... ...
instead of@array=(foo,bar,foo,bar)
Does anyone know how to stop my arrays getting squashed?@array=([foo,bar],[foo,bar])
...Also, I'm going to need to push elements onto the end of arrays in arrays. My thgouhts on this so far have been along the lines of;
will that work?push(@{$array[$aidx]},$value);
Thanks muchly,
Matt
update (broquaint): added <code> tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pushing into arrays of arrays
by Tomte (Priest) on Mar 05, 2004 at 11:52 UTC | |
|
Re: pushing into arrays of arrays
by xdg (Monsignor) on Mar 05, 2004 at 12:15 UTC | |
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 | |
|