[Thousand-oaks-pm] Perl hash question
Jim Walker
jim at reclaw.com
Fri Dec 2 09:49:25 PST 2005
And, for large hashes,
foreach (keys %bar) {$foo{$_} = $bar{$_}};
should use less memory.
--
Jim
Gary Ansok wrote:
>Robert Hull wrote:
>
>
>
>>I'm looking for a succinct way to join two hashes. What I would like is:
>>
>>%foo .= %bar ;
>>
>>Where %foo retains it values for keys undefined in %bar
>>and
>>%foo takes %bar values for keys defined in %bar.
>>
>>
>>
>>
>I believe that
>
>%foo = (%foo, %bar);
>
>will do what you want.
>
>Gary Ansok
>
>_______________________________________________
>Thousand-oaks-pm mailing list
>Thousand-oaks-pm at pm.org
>http://mail.pm.org/mailman/listinfo/thousand-oaks-pm
>
>
>
>
More information about the Thousand-oaks-pm
mailing list