in reply to (tye)Re4: eq or == with references
in thread eq or == with references

Okay. I guess that I had to learn to think more Perlishly.

When we use the '==' operator on references that does not mean, as it might in a strongly typed language, that references are therefore numbers.

Just as the distinction between references and pointers is a key element of Perl, the Janus-faced nature of Perl thingies which change according to their calling context is another key element of Perl. Regardless of the thingie, the calling context does not change the true nature of the thingie. The true nature of a reference is emphatically not a number even if the reference is called in numeric context.

The value of a reference in numeric context is simply a name consisting purely of numbers, as it is written: "My name is a number...", Jagger-Richard from the song "2000 Man" on Their Satanic Majesties Request in 1967.