Afternoon, Bill -

Tried using your suggested:

open IN, "/Includes/28ESP.pl" or die "open: $!"; print <IN>; close IN;

System said "open: No such file or directory at ....." 

BTW, this is all happening in Windows XP Pro, SP2. But the 28ESP.pl file is
there in the includes directory. Actually, the require works if I place
28ESP.pl file in the same directory as the code. The includes directory
lives right next to the images directory in the same path, and the images
directory files work fine.

Yes, I put a 1; at the end of the 28ESP.pl file.  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]  

-----Original Message-----
From: $Bill Luebkert [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 06, 2005 5:58 PM
To: [EMAIL PROTECTED]
Cc: Perl-Win32-Users@listserv.ActiveState.com
Subject: Re: Using canned subroutines with includes

Doug Loud wrote:

>  
> 
> 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";

Works for me.  You have to be on the same drive for it to work without the
drive letter.  You could also try using 'do' instead of 'require';

Try taking the same path and doing an open on it to make sure it's legit.

open IN, "/Includes/XYZ.pl" or die "open: $!"; print <IN>; close IN;

> 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):

You need to add a 1; to the end of your required file.

-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic
http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to