If you want to be really sure you should use refaddr from Scalar::Util since the reference type could overload any of eq, ==, "" or 0+.
Obviously not necessary in this case, but not doing it can catch you out (well, it's caught me out before) if you add overloading at a later date.
In reply to Re^3: Comparing references to sub's
by adrianh
in thread Comparing references to sub's
by leriksen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |