# declare anonymous hash my $hash = {}; map { $hash->{$_->[0]} = ['',$_->[1]] } @foo; for my $key (@bar) { $hash->{$key->[0]} ? $hash->{$key->[0]}[0] = $key->[1] : $hash->{$key->[0]} = [$key->[1],'']; }
In reply to Re: mashing two arrays
by marcpestana
in thread mashing two arrays
by punkish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |