in reply to how to turn off warning message

Don't use #!/usr/bin/perl -w, instead use warnings;

Replies are listed 'Best First'.
Re^2: how to turn off warning message
by Old_Gray_Bear (Bishop) on Nov 07, 2008 at 18:54 UTC
    To expand on anonymonk's accurate but terse comment.

    Both -w> and <c>use warnings; turn on the warnings diagnostics, it's a matter of scope.

    use warnings; turns on warnings-checking in the file containing the statement (local scope). -w set warnings for your file and any used modules (global scope).

    You usually (probably) want use warnngs; routinely.

    ----
    I Go Back to Sleep, Now.

    OGB