http://qs1969.pair.com?node_id=578736


in reply to Re^2: The difference between my and local
in thread The difference between my and local

I am getting following error, when I use strict and use $tt instead of $a My Code:-
use strict; my $tt = 3.14159; { local $tt = 3; print "In block, \$tt = $tt\n"; print "In block, \$::tt = $::tt\n"; } print "Outside block, \$tt = $tt\n"; print "Outside block, \$::tt = $::tt\n";
My Error:-
Can't localize lexical variable $tt at basic.pl line 4.