This worked as required and gave the following from the print C:\perl-programs\modules C:/perl5/lib C:/perl5/site/lib . I then tried to use a moudule in the new directory with a new line at the end of the code above ofuse strict "vars"; my $inc_item; use lib "C:\\perl-programs\\modules"; foreach $inc_item (@INC) { print "$inc_item\n"; }
However, this did not worked as I then got the following Can't locate modules/test.pm in @INC (@INC contains: C:\perl-programs\modules C: /perl5/lib C:/perl5/site/lib .) at C:\perl-programs\test-inc-iarg.pz line 13. BEGIN failed--compilation aborted at C:\perl-programs\test-inc-iarg.pz line 13. It seems that the lines are not processed in order so that it 'got' to theuse modules::test-module
before the use lib line even though this nearer the beginning. How can this be made to work?use modules::test-module
In reply to Re^2: Problem using -I argument with Perl
by merrymonk
in thread Problem using -I argument with Perl
by merrymonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |