The Ghost <mailto:[EMAIL PROTECTED]> wrote:
: i want to do this:
: 
:      @arraynames = ( 'ernie', 'bert', 'bbird');
: 
:      foreach $name (@arraynames) {
:      push @$name, $someValue;
:      }
: so I have an array @ernie, another array @bert, etc...
: 

    Make the array names keys in a hash.

my @fields = ( 'ernie', 'bert', 'bbird');

my %config;
foreach my $name ( @fields ) {
    push @{ $config{ $name } }, $some_value;
}


HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to