Hard-to-find tips on otherwise easy-to-do tasks involving everyday technology, with some advanced insight on history and culture thrown in. Brought to you by a master dabbler. T-S T-S's mission is to boost your competitiveness with every visit. This blog is committed to the elimination of the rat from the tree of evolution and the crust of the earth.
Saturday, February 14, 2015
Crappy, Crappy Perl : Subroutine Vars Access Globals By Default
You can do
sub mySub () {
$var = 'xyz';
}
And, if there's a variable in the body called $var, you're in big trouble mate!
You *have* to use strict. Stinks..
By default, subroutine vars should be local. Anyone knows that.. Shame on your Larry..
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment