in reply to Adding two lists together
For the non list how about;for my $i(0..$#list1){ $list1[$i] += $list2[$i]; }
I'm not sure if its really worth it however.my @list2; push @list2, $some_value, $some_other_value, $this_variable, $that_var +iable; for my $i(0..$#list1){ $list1[$i] += $list2[$i]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Adding two lists together
by AnomalousMonk (Archbishop) on Nov 05, 2009 at 19:06 UTC |