Здравствуйте $Bill, Friday, July 08, 2005, 3:32:10 AM, Вы написали:
BL> Doug Loud wrote: >> >> Well, here's an answer: >> >> I started with: require "/Includes/28ESP.pl"; and that didn't work. >> >> Then I tried all the other combinations you all were kind enough to suggest. >> Still no luck. >> >> Finally, I discovered that both of these will work: Hooray! >> >> my $mylib = 'includes/28ESP.pl'; >> require $mylib; >> >> OR >> >> require 'includes/28ESP.pl'; >> >> In view of the email conversation this started, it is intriguing to note >> that these statements work with single quotes and no delimiter or . in front >> of the includes. On XP Pro, SP2, that is.... BL> Doug, you're screwing our minds over. If the above works, then you must BL> be in the directory above the required script. BL> Answer these two questions: BL> What is the full path to the script ? : BL> What is the full path to the script you are trying to require ? : I think it's time make some digest of discussion Well, really the only point of confusion is relativ position of some script named, say, caller.pl which require some other script, traditionally named 28esp.pl :-). In my answers I supposed that caller.pl placed in some_arbitrary_folder and in the same folder there is directory includes with file 28esp.pl. In such case, as far as I understand, in caller.pl should work following: require "includes/28esp.pl"; #or require "includes\\28esp.pl"; #or require 'includes\28esp.pl'; #or require 'includes/28esp.pl'; #or require ".\\includes\\28esp.pl"; #or require "./includes/28esp.pl"; #or require '.\includes\28esp.pl'; #or require '.\includes\28esp.pl'; #or require "\\includes\\28esp.pl"; #only if some_arbitrary_folder #is root folder require "/includes/28esp.pl"; #only if some_arbitrary_folder #is root folder require '\includes\28esp.pl'; #only if some_arbitrary_folder #is root folder require '/includes/28esp.pl'; #only if some_arbitrary_folder #is root folder Then about path separators: slash is obviously more universal - it works on both *NIX and Windows. Slash make script portable. In case when caller.pl and 28esp.pl palced in different arbitrary folders then it's better (my opinion) use lib pragma lib 'x:/absolute/path/of/includes/folder'; After that works all of first eight variants listed earlier except one: require "./28esp.pl"; I can't guess why it produces an error. -- С уважением, Сергей mailto:[EMAIL PROTECTED] _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs