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:
use strict; use warnings; use Net::FTP;
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Difference between 'use warnings' and '-w' switch
by dave_the_m (Monsignor) on Jan 11, 2006 at 12:23 UTC | |
|
Re: Difference between 'use warnings' and '-w' switch
by northwind (Hermit) on Jan 11, 2006 at 12:25 UTC | |
|
Re: Difference between 'use warnings' and '-w' switch
by monkey_boy (Priest) on Jan 11, 2006 at 12:29 UTC | |
by muntfish (Chaplain) on Jan 11, 2006 at 13:02 UTC |