How do I change the @INC variable to use BioPerl?
Emily Wong
I have successfully installed BioPerl.
When I try to use the objects I get an error cannot locate Bio.seq.pm in @INC .....
The "build" programs put everything in the "download" directory.
I am having trouble moving the files to /usr/bin and suspect that maybe adding the "download" directory to the @INC paths might be easier.
How can I fix this?
11 Answer
The variable @INC is defined when Perl is compiled and it is embedded in the binary code.
The @inc array can be changed by modifying the PERL5LIB variable, from the command line, like so:
export PERL5LIB=/home/foobar/codeYou can add this to either your ~/.bashrc or ~/.bash_profile(the preferred location) to make this change permanent.
Additionally, you can use the following in your script code:
use lib '/home/foobar/code';