|Perl: the Markov chain saw|
Re: Difference between warnings pragma or enabling warnings using -w switch?by rupesh (Hermit)
|on Aug 30, 2005 at 05:16 UTC||Need Help??|
The -T command line switch turns on taint checking, something that's useful for CGIs when you want to make sure there's no user input that can possibly flow through to the operating system for security reasons. Typically you want to enable taint-checking as early in the command line options as possible.
-w enables warnings globally for the perl interpreter. It can be used for code that needs to maintain compatability with 5.005 and older perls, but for newer code, use warnings is better, because it will not enable warnings in parts of the program that are not designed to be run with them enabled.
The -w has a global effect on your entire program. The warnings pragma was introduced in Perl 5.6 and allows for scoped sections of warning-enabled code, with the ability to turn on and off specific classes of warning messages.
On more information on use warnings, you can visit this node --> here.