Perl references?



Hi, I want to check if two references point to the same object. It seems I can simply use

if ($ref1 == $ref2) { 
 print "refs 1 and 2 refer to the same thing\n";
}

as mentioned in perl ref.

Note I only want to know whether the references point to the exact same object. I don't look for a way to compare the content of the object(s).