--On Friday, September 26, 2003 5:51 PM -0400 Dan Anderson <[EMAIL PROTECTED]> wrote:
In the book I bought, Programming Perl, by O'Reilly they say I should use warnings instead of -w after the shebang and the perl path because -w is deprecated.
Is this true? Also, will use warnings; work on versions of perl < 5.8?
My copy of the Camel is at work, but if it says -w is deprecated, I'm inclined to believe it. :-)
The warnings pragma was introduced in Perl 5.6. perllexwarn says "The use warnings pragma is a replacement for both the command line flag -w and the equivalent Perl variable, $^W."
Removing -w and $^W from perl would break a great deal of existing code, so I doubt they're going away anytime soon. (But people can always run an older version of Perl if necessary. I vaguely recall hearing about people still using Perl v4, the "dead, flea-bitten camel carcass" that was last patched in 1992.)
In any case, the pragma gives you finer-grained control over warnings than does -w or $^W, as I suppose you already knew.
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]