Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

How to add paths in @INC file

by Anonymous Monk
on Jun 18, 2001 at 21:37 UTC ( #89369=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I want to add some paths like root/cgi-bin/csr in @INC file How can i do it give me response asap Thank Hussain

Replies are listed 'Best First'.
Re: How to add paths in @INC file
by mr.nick (Chaplain) on Jun 18, 2001 at 21:44 UTC
    If you are trying to allow Perl to find modules that you are use'or require'ing, you can use lib ...
    use lib '/path/to/my/libs'; use MySpecialLib;

    mr.nick ...

Re: How to add paths in @INC file
by cforde (Monk) on Jun 18, 2001 at 23:01 UTC
    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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://89369]
Approved by root
[Corion]: Weird - this "Install our backdoor SDK" spam is persistent. And I get the feeling it's not even automated, as it seems to be a re-forward of each mail, maybe even manually. Ah well, a quick rule in Thunderbird will move them to Spam automatically now :D
[Corion]: (the "backdoor SDK" is for distributing my software with an included backdoor, not for backdooring my own machine)
[marto]: ask for a trial
[marto]: then trick them into running your app
[marto]: once you have access, remove your email address from their system :P
[shmem]: why just that email address? why filtering?
[Corion]: shmem: I use email for contact, so I'd still like to receive emails from other people. Hence, I filter my email.

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2018-05-25 14:03 GMT
Find Nodes?
    Voting Booth?