Advertisement

12.05.2004 at 09:37AM PST, ID: 21230988
[x]
Attachment Details

"include files"

Asked by GreenAsJade in Perl Programming Language, Server Side Includes (SSI)

Tags: perl, include

I'm writing a fragment of perl which is being included by the main perl program elsewhere.

I want to split it into a few files for maintenance purposes, and include each of those from my "top level" fragment.

The problem is that if I do

 use "first_stuff.pl";
 use "second_stuff.pl";

in my top leve fragment, perl isn't looking in the directory where my fragment is for first_stuff.pl and second_stuff.pl.

In fact, it appears to be looking in the directory where the main prgram is running (and presumably its also looking in the @INC directories).

What I'm grappling with is that I seem to have no way of finding out what directory my fragment is in.. if I knew that, then I could put in in @INC or prepend it explicitly to the filename for use....

Any clues?

Start Free Trial
[+][-]12.05.2004 at 10:45AM PST, ID: 12749175

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.05.2004 at 11:05AM PST, ID: 12749236

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.05.2004 at 11:41AM PST, ID: 12749369

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.05.2004 at 11:58AM PST, ID: 12749437

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.05.2004 at 11:58AM PST, ID: 12749440

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.05.2004 at 12:22PM PST, ID: 12749532

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Perl Programming Language, Server Side Includes (SSI)
Tags: perl, include
Sign Up Now!
Solution Provided By: ozo
Participating Experts: 2
Solution Grade: A
 
 
[+][-]12.05.2004 at 01:03PM PST, ID: 12749666

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.05.2004 at 01:07PM PST, ID: 12749683

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32