- or download this
use warnings;
...
sub test{
print "sub: $s\n";
}
- or download this
"my" variable $s masks earlier declaration in same scope at test.pl li
+ne 8.
define var: s1
...
sub:
define var: s1-2nd
sub: s1-2nd
- or download this
use warnings;
...
my $s = "s1-2nd";
print "define var: $s\n";
&test;
- or download this
"my" variable $s masks earlier declaration in same scope at test.pl li
+ne 12.
define var: s1
sub: s1
define var: s1-2nd
sub: s1
- or download this
define var: s1
sub: s1
define var: s1-2nd
sub: s1-2nd