in reply to RE: Merging two @ARRAYS into a %HASH
in thread Merging two @ARRAYS into a %HASH
You can assign values to them too:my %foo = ( 'one' => 1, 'two' => 2, 'three' => 3, 'four' => 4, ); print @foo{ 'one', 'two' }, "\n"; print @foo{ 'three', 'four' }, "\n";
my %foo = (); @foo{ 'one', 'two' } = (1, 2); @foo{ 'three', 'four' } = (3, 4); print keys %foo;
|
---|