This is not rather the native perl silution, but i solved such problem by writing hashes to plain text files and comparing them using
(assuming you are running *nix systems).
These are not native perl functions, but the value of perl, among others is its flexibility and ability to be integreated with other programs