Later in this thread, Spidy, you say you want #2, but if someone else reading this wants the answer to #1, the "FindBin" module comes in handy.
E.g. suppose you have a top directory, and underneath it you have bin and lib, and under lib you have your modules. You could use:
use FindBin qw($RealBin);
use lib ("$RealBin/../lib");
To access your modules.
In this case,
$RealBin will be set to the directory of your script, and if you have a set way to navigate to your libraries from that directory, you can make use of that.
This technique can be useful, for example, if you have multiple versions of an application + set of libraries around, and want them both to be installed at the same time without version conflicts.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.