Perlのリファレンス比較は==演算子

Perl徹底攻略 (WEB+DB PRESS plus)を買いました。
p.18にリファレンス同士の比較が書いてあり、

リファレンス同士の比較

2つのリファレンスが同じものを指していれば値は等しくなります。ですから、リファレンスが入っている変数$xと$yがあったとき、==演算子で値を比べれば同じ物を指しているかどうかがわかります。

# $xと$yにはリファレンスが入っている
if ($x == $y) {
    # $xと$yは同じものを指している
} else {
    # $xと$yは別のものを指している
}

となっていて
「あれ、リファレンスって数字ではないのに==演算子なのか。アドレスが入っているからかな?」
と気になったのでperldoc perlrefしてみました。

Using a reference as a number produces an integer representing its storage location in memory. The only useful thing to be done with this is to compare two references numerically to see whether they refer to the same location.

if ($ref1 == $ref2) {  # cheap numeric compare of references
    print "refs 1 and 2 refer to the same thing\n";
}

リファレンスを数値として使うと、メモリ内のストレージの位置の 整数表現を生成します。 これを利用して便利な唯一の状況は、二つのリファレンスを数値として 比較することで、同じ場所を参照しているかどうかを調べる場合です。

if ($ref1 == $ref2) {  # cheap numeric compare of references
    print "refs 1 and 2 refer to the same thing\n";
}

http://perldoc.jp/docs/perl/5.16.1/perlref.pod

おー、なるほど。やっぱり==で数値として扱われて比較されるのかー。
こういうコンテキストやっぱり楽しい。Perl好きです。