Help for this page

Select Code to Download


  1. or download this
    my $foo;
    sub bar {}
    
  2. or download this
    package Foo;
    our $Bar;
    
  3. or download this
    my $foo=1;     # create an anonymous lexical and label it as $foo
    {
    ...
    print $Foo,$/;
    
    # prints 2 and 2
    
  4. or download this
    # thess pragmata apply to everything below
    use strict; 
    ...
    __END__
    "my" variable $Bar masks earlier declaration in same scope at D:\perl\
    +devlib\Text\strict2.pl line 7.
    Subroutine Bar redefined at D:\perl\devlib\Text\strict2.pl line 12.