in reply to Re: Make $^V and "my" implicit
in thread Make $^V and "my" implicit
"my" or it's equivalent should only be necessary in the not-so-common case where you have 2 variables with the same name and type ($@%). Why is "my" even necessary for the global declaration of $user in your example? "my" should only be necessary for the function-level $user variable in your case and, as a general rule, only necessary when distinguishing variables which have the same name and type ($@%).
Perl shoud apply rules such as these in a more fine-grained manner instead of peppering code with redundant scoping declarations. However, I am not arguing against the principle of "my" in general.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Make $^V and "my" implicit
by Corion (Patriarch) on Feb 03, 2014 at 17:52 UTC | |
by gunzip (Pilgrim) on Feb 03, 2014 at 18:02 UTC | |
|