http://qs321.pair.com?node_id=1063973


in reply to Re^4: What is true and false in Perl? (undef,undef)
in thread What is true and false in Perl?

What do you think ref does?

In your example code, $a doesn't contain a reference. It contains a false value. ref does exactly this: "Returns a non-empty string if EXPR is a reference, the empty string otherwise."


Dave

Replies are listed 'Best First'.
Re^6: What is true and false in Perl? (undef,undef)
by amartyaj (Initiate) on Nov 22, 2013 at 19:35 UTC
    Got it. Thanks a lot Dave.