Çäðàâñòâóéòå $Bill,

Thursday, July 07, 2005, 11:27:44 AM, Âû íàïèñàëè:

>> DL> Thanks.  I tried using
>> 
>> DL> require "\\includes\\28ESP.pl"; 
>> 
>> DL> But got an error message of:
>> 
>> DL> Can't locate \includes\28ESP.pl in @INC (@INC contains: C:/Perl/lib
>> DL> C:/Perl/site/lib .) 
>> 
>> DL> The includes directory is in the same path as the code, along with the
>> DL> images directory that contains gifs and jpegs for the site.        
>>  
>>     Try this:
>>     
>>     my $mylib = "includes\\28ESP.pl";
>>     eval "require $mylib";

BL> This work's fine (if on smae drive) :

BL> my $mylib = '/includes/28ESP.pl';
BL> require $mylib;

Yes, $Bill, eval is not needed. But path separator (slash or backclash) as 
first symbol
of path in require produces an error on win98 and perl5.8.6 b811 of
mine:
 Can't locate \includes\28ESP.pl in @INC (@INC contains: C:/Perl/lib
 C:/Perl/site/lib .)

BL> Make sure the required script returns a true (eg: 1;).
BL> Add the <drive>: if not on the same drive.

>>     And notice that in windows it's wrong when first symbol of path is
>>     path delimiter. There must be or driveletter or dot or name of
>>     file (or folder). E.g.
>> 
>>     "includes\\28ESP.pl" is good path the folder includes are in the
>>     same folder as requiring script
>>     ".\\includes\\28ESP.pl" also is good path and is the same as first
>>     "\\includes\\28ESP.pl" wrong path





-- 
Ñ óâàæåíèåì,
 Ñåðãåé                            mailto:[EMAIL PROTECTED]


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to