go ahead... be a heretic | |
PerlMonks |
Difference between 'use warnings' and '-w' switchby muntfish (Chaplain) |
on Jan 11, 2006 at 12:04 UTC ( [id://522411]=perlquestion: print w/replies, xml ) | Need Help?? |
muntfish has asked for the wisdom of the Perl Monks concerning the following question: I need a bit of clarification on the differences between saying use warnings; and putting -w on the command line. I thought they were the same. My code starts:
When I put -w on the command line, code within Net::FTP throws a warning at line 716 when trying to send a file. This is version 2.70 of Net::FTP and when I look at the source, it is trying to do -f $loc when $loc has never been assigned to (the warning is "uninitialised value in -f"). So the warning is genuine, nothing I can do to prevent it. The reason behind the error is not really relevant here, but I'm wondering why if I just say "use warnings" without the -w switch, this warning is not reported? Thanks. s^^unp(;75N=&9I<V@`ack(u,^;s|\(.+\`|"$`$'\"$&\"\)"|ee;/m.+h/&&print$&
Back to
Seekers of Perl Wisdom
|
|