in reply to Is reference blessed?

Try:

$r->isa('UNIVERSAL');
Background: all classes inherit from UNIVERSAL, (e.g. methods like 'isa'), therefore the above returns true for all blessed references

pike

Replies are listed 'Best First'.
Re: Re: Is reference blessed?
by gildir (Pilgrim) on Nov 23, 2001 at 15:33 UTC
    Won't work.

    If $r is not blessed, you get an 'Can't call method "isa" on unblessed reference' error.
    But, as I see it now

    UNIVERSAL::isa($r,"UNIVERSAL")
    will work