Shawn H Corey <shawnhco...@gmail.com> writes:

[...]

> If you want to find those in one but no the other, change the if:
>
> for my $name ( keys %inverse_h1 ){
>   if( exists $inverse_h2{$name} ){
>     # print "$name exists in both hashes:\n",
>           # Data::Dumper->Dump( [ $inverse_h1{$name},
> $inverse_h2{$name} ], [ 'h1', 'h2' ] ),
>           # "\n";
>   }else{
>     print "$name exists in only h1\n";
>   }
> }

I guess you didn't mean to leave Data::Dumper[...] commented?

With that uncommented, yes it does just that.  Again thanks for the
practical code.





-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to