D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

RE: [LUG] Perl: need to add path to @INC



 You can even use environment variables with use lib:  use lib $ENV{MYLIB};
and note that this is placed on the front of the @INC array, so this
directory is searched first.

Clive

-----Original Message-----
From: Steve Marvell
To: list@xxxxxxxxxxxx
Sent: 8/4/03 9:20 AM
Subject: Re: [LUG] Perl: need to add path to @INC

Adrian Midgley wrote:
> I'm looking in the wrong places, obviously, how do I do that, 
> please?

This is not how to do it (although it works):

BEGIN {
       unshift(@INC,'/usr/underprivileged/me/lib');
      }
use Xbase;

This is how to do it:

use lib '/usr/underprivileged/me/lib';
use Xbase;

Now, doesn't that look nicer.

Steve

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly