my guess would be that the locating of use'd modules is a compile time
directive...
while your push @INC is a runtime thing
ie, too late
besides, you use the 'use lib' pragma anyway
ie:
use lib qw($ENV{'PERL_LIB'});
hth,
Jos Boumans
----- Original Message -----
From: "Tirumal Reddy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 27, 2001 12:42 PM
Subject: using modules in windows version of perl
> hi,
> My problem is to use Modules which are already built in and i want
> to run this perl script from my DOS Prompt and i have installed win
> version of perl.I tried the below program:
>
> #!/usr/bin/perl -w
>
#---------------------------------------------------------------------------
----------------------------#
>
> # 1.0 load modules
>
#---------------------------------------------------------------------------
----------------------------#
>
> push ( @INC,"$ENV{'PERL_LIB'}" ); # this PERL_LIB is the path to cwd.pm
> file
> use Cwd;
> #-------------------------------------------------------
> $pwd=getcwd();
> print " working dir is : $pwd";
>
> and error i get is :
>
> ERROR:
> Can't locate Cwd.pm in @INC at C:\Tirumal\Perl_scripts\module_test.pl
> line 6.
> BEGIN failed--compilation aborted at
> C:\Tirumal\Perl_scripts\module_test.pl line 6.
>
> Please help me to solve this problem...
>
> thanx in advance
>
> Tirumal Reddy
>
>
----------------------------------------------------------------------------
----
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]