in reply to ref == "REF"
In general, it's not smart to rely on any specific value for ref() beside true or false, except when you really have to, i.e. for serialization. The value of ref() has changed for some types (regexes (?), filehandles...), and AFAIK there is no guarantee it won't change again.> perl -e 'print ref \\"test"' REF
edit: after reading perlfunc on it, it appears you can count on the return values given there (which do not cover all perl data types):
SCALAR ARRAY HASH CODE REF GLOB LVALUE and the package name for a blessed object (though you shouldn't use that)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: ref eq "REF"
by gaal (Parson) on Oct 18, 2004 at 10:23 UTC | |
by edan (Curate) on Oct 18, 2004 at 12:54 UTC | |
by gaal (Parson) on Oct 18, 2004 at 14:18 UTC | |
by edan (Curate) on Oct 18, 2004 at 15:19 UTC | |
by gaal (Parson) on Oct 18, 2004 at 15:53 UTC | |
| |
by Joost (Canon) on Oct 19, 2004 at 09:06 UTC | |
by gaal (Parson) on Oct 19, 2004 at 10:11 UTC | |
by Jasper (Chaplain) on Oct 18, 2004 at 12:24 UTC | |
by gaal (Parson) on Oct 18, 2004 at 14:09 UTC | |
by Jasper (Chaplain) on Oct 19, 2004 at 09:12 UTC |