in reply to Breaking a script into smaller files
You'll first have to decide if you want the current directory to end up in the beginning or in the end of your @INC search path. Flame already showed you how to get it in the end of @INC search path.
I'd definitely recommend doing this in a BEGIN block. That way you're sure it will be available for all modules used by your script. If not, you may loose track of what module uses the modified search path and what module doesn't.
The following will put the 'current directory' first (which is probably what you want in this case).
BEGIN{unshift(@INC,'.');}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Breaking a script into smaller files
by John M. Dlugosz (Monsignor) on Nov 13, 2001 at 00:33 UTC | |
by chromatic (Archbishop) on Nov 13, 2001 at 05:36 UTC | |
by John M. Dlugosz (Monsignor) on Nov 13, 2001 at 09:18 UTC |