http://www.perlmonks.org?node_id=1073239


in reply to Make $^V and "my" implicit

why do I have to type use 5.016; at the top of every script?

You don't. You only need to this if you want version 5.16 of the language. Having the features always on or on by default would break programs, which is the very reason they were made features you need to turn on.

If we've admonished for so many years to (almost) always use "my" variables for proper scoping surely it is now time to makey "my" implicit?

Because having you declare them finds spelling errors. This is the worse suggestion for a change in Perl I have ever heard.

(I'm assuming you're not suggesting that we'd no longer be able to declare them explicitly. That would be even worse.)

Replies are listed 'Best First'.
Re^2: Make $^V and "my" implicit
by gunzip (Pilgrim) on Feb 03, 2014 at 17:54 UTC
    See my reply to Corion above. I'm not against what "my" stands for. Just reserve its use for cases where it really makes a difference, ie. same variable name and type ($@% etc.) used in different scopes. Forget it for anything else.

      That doesn't address what I said at all. If declaring variables isn't always required, typos in variable names can't be found. This would be a major loss. As such, declaring variables is always required, always makes a difference.