#flag some situations as runtine errors use strict; #attemps to use variable name not declared with my #this will give error sub myfunc{ my $x; $x=20; print "$x\n"; #this is a private $x } $x=10; #this is a global $x # my $x=10; #this will run, force scoping print "$x\n"; myfunc(); print "$x\n";