in reply to Hash Question
use strict; my(%hash1) = ( 'foo' => 'bar', 'bleh' => 'qwer', 'lala' => 'asdf' ); my(%hash2) = ( 'foo' => 'bvcx', 'bleh' => 'lkjh', 'lala' => 'iopj' ); my(%hash3) = map { $_ => [$hash1{$_}] } keys(%hash1); map { push(@{$hash3{$_}},$hash2{$_}); } keys(%hash2); foreach (keys(%hash3)) { print "$_ is\n"; map { print "\t$_\n"; } @{$hash3{$_}}; }
/****************************/ jason@gost.net, wh@ckz.org http://jason.gost.net /*****************************/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Hash Question
by chromatic (Archbishop) on Oct 06, 2000 at 08:28 UTC | |
by lindex (Friar) on Oct 06, 2000 at 22:04 UTC |