Hi all,
I am executing a perl script from a directory other than the one it is
located in. I have a package that the script is using located in the same
directory as the script, but the script cannot find this package because
the package is not in the include directory. I need a way to incl
: but I am having trouble stripping $0 of the perl script name.
The standard File::Basename module has a dirname() function
that will do that for you.
Alternatively, you can say something like this in your perl script:
use lib '/path/to/your/module/file.pm';
-- tdk
:
Subject: Re: Include directory as
location of perl script
04/27/01 04:22
PM
Craig Moynes/Markham/IBM ([EMAIL PROTECTED]) wrote:
> I cannot use a fixed library path as the script will be installed in
> different directories on different systems.
>
> the idea is it will be executed as:
> /home/dbncc/perl/scripts/.pl
>
> and the library will also be located in the same
ED]
>
> Kimball) cc:
>
> Su
--- Johnathan Kupferer <[EMAIL PROTECTED]> wrote:
> . . .
> Oh, and just to raise some hell: if you're new to Perl, you may also
> want to look at Python. I don't know which language I would recomend
> more...
I recommend Perl to gearheads and programmers looking for a new tool.
For rank begi
On Fri, 27 Apr 2001, Johnathan Kupferer wrote:
> This will do just what you want. By the way, to anyone who will listen:
> Get the Camel Book, "Programming Perl 3rd ed." published by O'Reilly.
> If you are serious about Perl, get it and read it. You'd be surprised
> how many of the question
Johnathan Kupferer ([EMAIL PROTECTED]) wrote:
> Camel Book, page 851:
...
> This will do just what you want. By the way, to anyone who will listen:
> Get the Camel Book, "Programming Perl 3rd ed." published by O'Reilly.
> If you are serious about Perl, get it and read it. You'd be surprised
Andrew Moore writes ..
>On Fri, Apr 27, 2001 at 04:25:49PM -0400, Craig
>Moynes/Markham/IBM wrote:
>> I cannot use a fixed library path as the script will be installed in
>> different directories on different systems.
>>
>> the idea is it will be executed as:
>> /home/dbncc/perl/scripts/.pl