in reply to Re: Re: Re: Fast Way to Combine Two Hashes
in thread Fast Way to Combine Two Hashes
They are undef, try this:
This technique works great when youmy %hash2; undef @hash2{qw(a b c)}; my %hash1; undef @hash1{qw(c d e)}; undef @hash2{keys %hash1}; print "$_ ",defined($hash2{$_})?"def\n":"undef\n" for keys %hash2;
Update: corrected by mirod, anyway, this works great when working with sets and you don't care about the values.
|
---|