Help for this page

Select Code to Download


  1. or download this
    # Begin Package Foo
    package Foo;
    our $x = 1;
    # End Package
    
  2. or download this
    # Begin Package Bar
    package Bar;
    our $x = 2;
    # End Package
    
  3. or download this
    # Main Program
    use Foo;
    ...
    print "x without package reference = $x";
    print "Foo x = $foo::x;        # Output should be "Foo x = 1"
    print "Foo x = $bar::x;        # Output should be "Bar x = 2"