in reply to Add Array values

EDIT: Disregard post. I didn't understand what was asked.

---------

I don't see why you need complicated algorithms here. Push will take multiple values - why not use it? See below for various methods:

use strict; use warnings; my %hash = ( one => [1,2,4], two => [5,7,9], ); my @new1 = (10,11,12); my $new2 = [13,14,15]; push(@{$hash{one}}, @new1); push(@{$hash{one}}, @$new2); push(@{$hash{one}}, 16, 17, 18); print join(',', @{$hash{one}});

Replies are listed 'Best First'.
Re^2: Add Array values
by debiandude (Scribe) on Dec 29, 2004 at 21:16 UTC
    I think you misunderstood what I was asking. I didn't need to concat values to the end of the array. I acutally wanted to add the numbers to the array values.