in reply to Re^3: "last expression" quiz
in thread "last expression" quiz

as well as as the last statement in a required file/module.

Well, you can use whatever you want as the last statement of a required module without getting the "Useless use of a constant in void context" warning.

-sauoq
"My two cents aren't worth a dime.";

Replies are listed 'Best First'.
Re^5: "last expression" quiz
by bart (Canon) on Oct 19, 2005 at 22:48 UTC
    True, if you actually require the file. That probably is because then, the last statement isn't called in void context.

    But you do get the warning if you try to test such a module for syntax errors using perl -wc FILE. Unless you actually use 1.