Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: Supressing warnings

by morgon (Deacon)
on Jul 22, 2010 at 23:41 UTC ( #850940=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Supressing warnings
in thread Supressing warnings

#!/home/mh/perl512/bin/perl -w warn "Hubba\n"; # script a.pl, produces warning

When you run this as "perl -X a.pl" you still get the warning - even though -X should disable them.

Is that because -w (from shebang) is "stronger" than -X (from command line)?

UPDATE:

The above is crap - sorry.


Comment on Re^4: Supressing warnings
Download Code
Replies are listed 'Best First'.
Re^5: Supressing warnings
by Boldra (Deacon) on Jul 23, 2010 at 07:10 UTC
    I think the reason Morgon says it's crap is because -w has no effect on warn. If you change the test to actually produce a warning, then the -X on the command line is indeed "stronger" than the -w in the shebang, but that's because the -X is always stronger than the -w, even if they swap places, or are both together on the command line or both together in the shebang.



    - Boldra

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://850940]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (13)
As of 2015-07-31 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls