Help for this page

Select Code to Download


  1. or download this
    package Mod2;
    
    ...
    
    sub subr { return "subr() was called\n"; }
    1;
    
  2. or download this
    use Mod2 'argument'; 
    print subr();
    
  3. or download this
    import() was called with arguments : Mod2 argument
    my arg: argument
    subr() was called
    
  4. or download this
    package Mod3;
    
    ...
    IMPORT{ print "inside the IMPORT block\n"; }
    
    1;
    
  5. or download this
    inside the IMPORT block
    Can't call method "IMPORT" without a package or object reference at Mo
    +d3.pm line 11.
    Compilation failed in require at Script3.pl line 5.
    BEGIN failed--compilation aborted at Script3.pl line 5.