in reply to Re^3: Easy Reference for Contexts
in thread Easy Reference for Contexts

Tom is right. ANYTHING is true:
$ perl -E 'say +ANYTHING ? "true" : "false"' true

Replies are listed 'Best First'.
Re^5: Easy Reference for Contexts
by LanX (Saint) on Apr 15, 2011 at 11:14 UTC
    Ladys and gentleman, let me introduce the new "author context"!

    If you sense¹ a hidden guru identity behind a novice account, reread a post with amplified irony-factor ... ;-)

    Cheers Rolf

    1) just be careful if you see magical unicode "switches" in the text ...

    ---------------------------

    UPDATEs:

    DB<119> sub ANYTHING {} DB<120> print "false" unless ANYTHING false

    not feasible with undef.

    --------

    Funnily in Python it's easily possible to globally redefine False and True...

    > python Python 2.5.2 (r252:60911, Jan 20 2010, 23:16:55) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> False,True=True,False >>> False True >>> True False