in reply to Using "USE" instead of "DO" for subroutines call in external file

José's Guide for creating Perl modules


holli, /regexed monk/
  • Comment on Re: Using "USE" instead of "DO" for subroutines call in external file
  • Download Code

Replies are listed 'Best First'.
Re^2: Using "USE" instead of "DO" for subroutines call in external file
by Anonymous Monk on May 27, 2005 at 07:22 UTC
    thanks guru, but I don't intend to create CPAN module. I just want to use it personally. Does it has to be that complicated as described in that website? Sorry I'm a newbie.
      read the part about "Exports".


      holli, /regexed monk/
Re^2: Using "USE" instead of "DO" for subroutines call in external file
by newest_newbie (Acolyte) on May 27, 2005 at 15:57 UTC
    Doe the program work currently with 'use'?
    If not, maybe you are missing use lib
    Try this:
    #!/usr/local/bin/perl use lib 'path/to/mysub.pm'; use mysub;