in reply to Pushing Arrays
Be careful what you mean here and whether you want an array :
my @setargs = ( $set1, $set2 );
or a reference to an array:
my $setargs_ref = [ $set1, $set2 ];
You can push onto either, as long as you refer to it properly
foreach my $set (whatever loop) { push @setargs, $set; push @{ $setargs_ref }, $set; # explicit dereference }
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Pushing Arrays
by Roy Johnson (Monsignor) on Aug 15, 2005 at 13:57 UTC | |
|
Re^2: Pushing Arrays
by webchalkboard (Scribe) on Aug 15, 2005 at 14:41 UTC |