Help for this page

Select Code to Download


  1. or download this
    use warnings;
    
    ...
    sub test{
            print "sub: $s\n";
    }
    
  2. 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
    
  3. or download this
    use warnings;
    
    ...
    my $s = "s1-2nd";
    print "define var: $s\n";
    &test;
    
  4. 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
    
  5. or download this
    define var: s1
    sub: s1
    define var: s1-2nd
    sub: s1-2nd