Help for this page

Select Code to Download


  1. or download this
    { 
        $x = 1;
    ...
            $x = 2;
        }
    }
    
  2. or download this
    { 
        my $x = 1;
    ...
            my $x = 2;
        }
    }
    
  3. or download this
    { 
        $x = 1;
    ...
            my $x = 2;
        }
    }
    
  4. or download this
    { 
        my $x = 1;
    ...
            my $x = 2;
        }
    }
    
  5. or download this
    { 
        my $x = 1;
    ...
            $x = 2;
        }
    }
    
  6. or download this
    { 
        my $x = 1;
    ...
            $x = 2;
        }
    }
    
  7. or download this
    { 
        my $x = 1;
    ...
            my $x = 2;
        }
    }
    
  8. or download this
    { 
        my $x = 1;
    ...
            my $x = 2;
        }
    }
    
  9. or download this
    sub foo { 
        if (1) {
    ...
        }
        print $x;
    }
    
  10. or download this
    sub foo { 
        if (1) {
    ...
        }
        print $x;     # undeclared
    }
    
  11. or download this
    sub add { 
        $x = 0;
    ...
        }
        print $x;
    }
    
  12. or download this
    sub add { 
        my $x = 0;
    ...
        }
        print $x;         # prints 0
    }
    
  13. or download this
    use automine
    # our $var;
    ...
        $var = shift; # not 'my $var' if explicit 'our $var' exists 
        ...
    }