Help for this page

Select Code to Download


  1. or download this
    package Foo;
    use base 'Exporter';
    @EXPORT = "func";
    
    sub func { return "Foo" }
    
  2. or download this
    package Bar;
    use base 'Exporter';
    @EXPORT = "func";
    
    sub func { return "Bar" }
    
  3. or download this
    [matt@blue 478146] cat func.pl 
    package func;
    ...
    print func();
    [matt@blue 478146] perl -l func.pl 
    Bar
    
  4. or download this
    [matt@blue 478146] cat meth.pl 
    package meth;
    ...
    print $o->func;
    [matt@blue 478146] perl -l meth.pl 
    Foo