On 4/13/07, carol white <[EMAIL PROTECTED]> wrote:
Hi, I want to use 2 modules in my perl program: module1.pm and module2.pm. module1.pm is in current directory. to use module2.pm which is in another directory I wil use: use lib 'path-to-other-directory'; but I have another module named module1.pm in the same directory as module2.pm that I don't want to use. how could I avoid to use module1.pm in the other directory?
snip
The order of the entries in @INC controls which module will be chosen. So you just need to make sure . is in @INC before path-to-other-directory: #remember lib unshifts its argument on @INC, so the last use lib is the first path use lib "path-to-other-directory"; use lib "."; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/