![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compare/Diff between directories and subdirectories? | andylee80 | UNIX for Dummies Questions & Answers | 5 | 07-12-2007 09:45 AM |
| perl package question | hankooknara | Shell Programming and Scripting | 1 | 06-26-2007 09:49 PM |
| perform diff between 2 directories | umen | UNIX for Dummies Questions & Answers | 5 | 08-25-2006 11:55 AM |
| how to change working directories in perl? | megastar | Shell Programming and Scripting | 1 | 11-02-2005 03:05 PM |
| perl: globals and a package. | effigy | Shell Programming and Scripting | 6 | 12-22-2004 08:47 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
perl package directories - what if the script is diff DIR to the one contain *.pm?
Hi there,
say the package is in the ~/ and it's ~/packageFoo.pm I can use usePackage.pl in ~/ (~/usePackage.pl). Now, if I move it to ~/subDIR/usePackage.pl, the script won't work because it's not in the same DIR with packageFoo.pm How can i fix it? Thanks Gusla |
|
||||
|
Two ways.
Just amend the include path at the top of your script, i.e. @INC e.g. Code:
@INC = ('..', @INC);
Code:
BEGIN {
@INC = ('..', @INC);
}
e.g. Code:
use lib '..'; http://theoryx5.uwinnipeg.ca/CPAN/perl/lib/lib.html |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|