# Do some matching foreach my $auth_id (keys %authors) { foreach my $mid (keys %authors) { print "$authors{$auth_id}{'author'} \t matches \t $authors{$mid}{'author'}\n" if ( &matchme( $authors{ $auth_id}, $authors{$mid} ) ); } # end-foreach } # end-foreach sub matchme { # return true for a match otherwise false. } # end-sub