On Sat Jan 03 2009 @  9:21, David Newman wrote:
> On 1/2/09 5:22 PM, Rob Dixon wrote:
> >> #!/usr/bin/perl -w
> >>
> >> use strict;
> > 
> > You should also use the warnings pragma instead of the command-line switch.
> > 
> >   use warnings;
> 
> OK. Why is this better?

My understanding is that the pragma (use warnings;) is more flexible than
-w. You can turn it off for specific blocks, for example, and it doesn't
apply to modules or other files you load with 'use' or 'require'. See here
for more: http://perldoc.perl.org/perllexwarn.html

Hope this helps, T

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to