in reply to (Ovid) Re: useless use of a constant in a void context?
in thread useless use of a constant in a void context?

Actually tracking down diagnostic messages is one thing where people Really Should use the online documentation. They change a lot from release to release, and not knowing how to get the ones for your version of Perl can seriously confuse. (There was a thread once involving our where that came up, there was nothing in 5.003 and hence Camel 2, it exits in 5.6 and hence Camel 3, but in 5.005 the word was reserved and generated a warning that confused some...)

In this case you first type:

perldoc perldiag
then type:
/Useless use
then type "n" until you get to the right message. If you go too far type "1G"

Where I said "Useless use" above I just wanted some part of the fixed error message. Usually it isn't hard to guess, but sometimes you will need to try twice to figure out what it should be.

That will give you messages that are appropriate for your version of Perl.

Replies are listed 'Best First'.
Re: Re (tilly) 2: useless use of a constant in a void context?
by merlyn (Sage) on Nov 20, 2000 at 20:37 UTC
    And if you're too lazy to do that, just add
    -Mdiagnostics
    to your command line. It looks up any error message in perldiag for you! No excuse for "not having the manpage easily" now!

    -- Randal L. Schwartz, Perl hacker