Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
the module SomeModule.pm:use strict; use warnings; use Cwd; my $dir = getcwd; my $file = $dir . "/myModules/" . "SomeModule.pm"; use $file; print "I am in the main package\n"; SomeModule::func();
thank youpackage SomeModule; use strict; use warnings; sub func { print "I am in func in SomeModule\n"; } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: calling a module in a folder within current directory
by shmem (Chancellor) on Dec 07, 2009 at 14:13 UTC |