Help for this page

Select Code to Download


  1. or download this
    # File: Foo.pm
    
    ...
      print "Hello from Foo!\n";
    }
    __END__
    
  2. or download this
    # File: foo.pl
    require Foo;
    ...
    ::hello();      # prints "Hello from main!\n";
    Foo::hello();   # prints "Hello from Foo!\n";
    __END__
    
  3. or download this
    # File: Foo.pm
    
    ...
      print "Hello from Foo_Helper!\n";
    }
    __END__
    
  4. or download this
    # File: foo.pl
    require Foo;
    ...
    Foo::hello();         # prints "Hello from Foo!\n";
    Foo_Helper::hello();  # prints "Hello from Foo_Helper!\n";
    __END__
    
  5. or download this
    require Foo_Helper;
    
  6. or download this
    Can't locate Foo_Helper.pm in @INC (@INC contains: /usr/local/lib/perl
    +/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /u
    +sr/local/lib/site_perl .) at foo.pl line 2.
    
  7. or download this
    # File: Foo.pm
    
    ...
    
    # Look, Ma!  No Foo!
    __END__
    
  8. or download this
    # File: foo.pl
    require Foo;
    ...
    Bar::hello();         # prints "Hello from Bar!\n";
    Foo_Helper::hello();  # prints "Hello from Foo_Helper!\n";
    __END__
    
  9. or download this
    # File: Foo.pm
    
    ...
    }
    
    __END__
    
  10. or download this
    # File: More_Foo.pm
    
    ...
    }
    
    __END__
    
  11. or download this
    # File: foo.pl
    
    ...
    Foo::hello_2();       # prints "Still in Foo!\n";
    
    __END__
    
  12. or download this
    require Foo;
    require More_Foo;
    
  13. or download this
    Undefined subroutine &Foo::hello_2 called at foo.pl line 10.
    
  14. or download this
    # File: Foo.pm
    
    ...
    sub hello {
      print "Hello from Foo!\n";
    }