Hi,

I have a perl hash that contains arrays, something like:

my %hash = (
'var1' => ['one', 'two', 'three'],
'var2' => ['1', '2', '3'],
#...
);

I would like to push new elements to the array references from this hash. Is
this possible?

I have tried something like:

push($hash{var1}, 'new_element');

But it gives an error telling that the first parameter of the push function
must be an array and not a hash element.

Please tell me how to do that.

Thank you.

Teddy


-- 
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