Help for this page

Select Code to Download


  1. or download this
    # file foo.pl
    use strict;
    ...
    }
    print __FILE__,' ',__LINE__,' ',__PACKAGE__,":: \$foo is '$foo'\n";
    print __FILE__,' ',__LINE__,' ',__PACKAGE__,":: \$Foo::foo is '$Foo::f
    +oo'\n";
    
  2. or download this
    # file bar.pl
    use strict;
    ...
    
    package Bar;
    print __FILE__,' ',__LINE__,' ',__PACKAGE__,":: \$foo is '$foo'\n";
    
  3. or download this
    #!/usr/bin/perl
    
    ...
    require 'bar.pl';
    
    print __FILE__,' ',__LINE__,' ',__PACKAGE__,":: \$foo is '$foo'\n";
    
  4. or download this
    foo.pl 8 Foo:: $foo is 'foo'
    foo.pl 11 Bar:: $foo is 'foo'
    ...
    bar.pl 12 Foo:: $foo is 'foo'
    bar.pl 15 Bar:: $foo is 'foo'
    main.pl 8 main:: $foo is 'bar'