in reply to Using "my" suppresses "Name used only once" warning?
Personally I think this warning is one of the more annoying ones. It triggers to many false positives (at least, for the way I code). I hate having to use local, our, or use vars just to quiet the warning.
I'm not sure what you mean by "using a string as a number". Scalars in Perl are both strings and numbers. But Perl does already warn you (if you have warning on) if you use a string that doesn't look like a number as an operand for an arithmetic operation.
$ perl -we '"foo" + "bar"' Argument "bar" isn't numeric in addition (+) at -e line 1. Argument "foo" isn't numeric in addition (+) at -e line 1.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Using "my" suppresses "Name used only once" warning?
by Wysardry (Pilgrim) on Feb 03, 2003 at 00:10 UTC | |
by Abigail-II (Bishop) on Feb 03, 2003 at 01:18 UTC | |
by Wysardry (Pilgrim) on Feb 03, 2003 at 02:14 UTC | |
by Abigail-II (Bishop) on Feb 03, 2003 at 08:18 UTC | |
by Wysardry (Pilgrim) on Feb 03, 2003 at 18:53 UTC | |
| |
by Biker (Priest) on Feb 03, 2003 at 13:17 UTC | |
by demerphq (Chancellor) on Feb 03, 2003 at 13:56 UTC |