I have learnt that by default, the scope of all variables is global. If you want to use local scope, either use my() or local() function. If you use
use strict, then you must use my() for each variable.
Now is there any way this behaviour be altered in such a way that
1) By default all the variables have local scope (no need of my()).
2) We should be able to use a keyword (say global()) to declare a variable having global scope() ?
I have seen Perl to be a flexible language with everything else, so I expect there must be some way to do this too. But which?