Help for this page

Select Code to Download


  1. or download this
    package M1;
    use parent qw(Exporter);
    ...
    sub func{print "Hello"}
    sub import{print "Imported";@EXPORT=qw(func)}
    1;
    
  2. or download this
    perl -I. -le 'use M1;func()'
    Imported
    Undefined subroutine &main::func called at -e line 1.
    
  3. or download this
    package M1;
    use parent qw(Exporter);
    ...
    sub func{print "Hello"}
    #sub import{print "Imported";@EXPORT=qw(func)}
    1;
    
  4. or download this
    perl -I. -le 'use M1;func()'
    Hello