Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: How to add paths in @INC file

by cforde (Monk)
on Jun 18, 2001 at 23:01 UTC ( #89398=note: print w/ replies, xml ) Need Help??

in reply to How to add paths in @INC file

There are a couple of ways depending on what you're trying to do: Perl has a '-I' pararamter which allows additional libraries to be included like this:

Perl -I "root/cgi-bin/csr"
For those on Windows, beware that ActiveState Perl 5.005_3 has a bug that causes paths to be chopped at the first space. or if you don't want (or can't) pass parameters you probably want this:
use 'root/cgi-bin/csr';
as a last resort you might try:
BEGIN { push @INC, 'root/cgi-bin/csr' };
The BEGIN block is executed before the rest of the program.

Have fun,
Carl Forde

Comment on Re: How to add paths in @INC file
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://89398]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2015-12-01 01:40 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (791 votes), past polls