in reply to Using "my" suppresses "Name used only once" warning?
Why yes it does.
Using the strict module forces you to declare variables lexically (using my $var) and belong to a block or file, or be declared globally.
When it is declared to a block of code(ie sub), I guess the value of "used once" is no longer issue as the value disappears after the sub has completed.
A global declaration well the same thing comes to play but they disappear at programs end.
Mind you that is how I understand it. If I am wrong one of brothers will surely correct me! ;-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Using "my" suppresses "Name used only once" warning?
by Wysardry (Pilgrim) on Feb 02, 2003 at 23:53 UTC | |
by Marza (Vicar) on Feb 03, 2003 at 00:04 UTC | |
by Wysardry (Pilgrim) on Feb 03, 2003 at 00:23 UTC | |
by bart (Canon) on Feb 03, 2003 at 08:13 UTC | |
by Wysardry (Pilgrim) on Feb 03, 2003 at 19:21 UTC | |
|