No drive letter is necessary if the script and the required file are on the
same drive.  If they are not on the same drive, then the require statement
would read as follows:

Require "d:\\Includes\\XYZ.pl";

(replace d: with whatever drive letter the "Includes" directory resides on)

Chad Uretsky
Lead Network and Security Engineer, IT | NetIQ Corporation





-----Original Message-----
From: Jones Robert TTMS Contractor [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 06, 2005 10:05 AM
To: Chad I. Uretsky; '[EMAIL PROTECTED]';
'[email protected]'
Subject: RE: Using canned subroutines with includes



     Where's your drive letter?


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Chad I. Uretsky
> Sent: Wednesday, July 06, 2005 9:39 AM
> To: '[EMAIL PROTECTED]'; 
> '[email protected]'
> Subject: RE: Using canned subroutines with includes
> 
> 
> Try using the following (I haven't tested this), since things
> seem a little
> different on Windows:
> 
> Require "\\Includes\\XYZ.pl";
> 
> In my experience, I've found Windows prefers the normal
> backslash to the
> *NIX-preferred forward slash.
> 
> If that doesn't work, perhaps try including a lib path and
> then requiring
> the file, like so (again, I haven't tested this):
> 
> Use lib "\\Includes";
> Require "XYZ.pl";
> 
> 
> Chad Uretsky
> Lead Network and Security Engineer, IT | NetIQ Corporation
> 
> 
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Doug
> Loud
> Sent: Wednesday, July 06, 2005 8:29 AM
> To: [email protected]
> Subject: Using canned subroutines with includes
> 
> 
>  
> 
> Morning -
>  
> For many years, in the unix/perl world I could set up a
> perl/cgi web page to
> use a bunch of subroutines that were available to my perl 
> based web pages
> with this command:
>  
> require "/Includes/XYZ.pl";
>  
> where XYZ.pl contained several subroutines to be used in the
> web page as
> needed.
>  
> In the windows world, however, when I try the same thing, I
> get an error
> telling me that  the system "Can't locate /Includes/XYZ.pl in @INC ".
>  
> Currently, the XYZ.pl file does live in the Includes
> directory, and looks
> like this (for now):
>  
> ##############################################################
> ###########
> #                                    XYZ Includes           
> ##############################################################
> ###########
>  
> sub good_word {
>   $fVerify = 0;
>  ($login_name, $password) = @_;
>   foreach $record (@file_info){
>     ($file_login, $file_name, $file_pw, $file_company, 
> $file_code)=split(/\|/,$record);
>   if ($file_login eq $login_name && $file_pw eq $password){
>      $code_name = $file_name;
>      $code_company = $file_company;
>    $code_level = $file_code;
>      $fVerify = 1;
>   }
>  }
> }
>         
> Can't require and an includes directory be used in Windows based Perl?
>  
> Thanks!
> 
> Douglass N. Loud
> President
> Integrated Information Systems, Inc.
> 292 Fifth Avenue
> New York, NY 10001
> 212-714-3522 (office)
> 203-952-7108 (cell)
> [EMAIL PROTECTED]
> 
> _______________________________________________
> Perl-Win32-Users mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> _______________________________________________
> Perl-Win32-Users mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to