in reply to (ar0n) Re: eq or == with references
in thread eq or == with references
Sorry, no. References have a little-used feature that was specifically designed to make == work for comparing references.
outputs:my $var; print \$var,$/; print 0+\$var,$/;
so $ref1 == $ref2 if and only if they both point to the same object. This is a very efficient test. eq will also work but isn't quite as efficient. - tye (but my friends call me "Tye")SCALAR(0x1a6533c) 27677500
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (tye)Re: eq or == with references
by ariels (Curate) on Jul 08, 2001 at 12:23 UTC | |
by tye (Sage) on Jul 09, 2001 at 00:03 UTC |