in reply to Re^2: Complex hash?
in thread Complex hash?

ref returns the following values: And it those that you must test for - depending on what you are looking for.

Replies are listed 'Best First'.
Re^4: Complex hash?
by GrandFather (Saint) on Aug 25, 2006 at 04:13 UTC

    Just to disambiguate a little: ref returns SCALAR for a reference to a scalar. For a simple scalar it returns undef.

    Note too that ref returns the object type for an object so the range of strings that can be returned is essentially unlimited.


    DWIM is Perl's answer to Gödel