Tuesday, August 4, 2009

How to find include path (@INC) for installed Perl environment?



Methode 1: You can run the following commands to get the @INC path

perl -e "print qq(@INC)"


You can just run that command from the both Linux and dos command line.

The output from this command on Windows PC will looks like this:

C:/Perl/lib C:/Perl/site/lib .


The output from Linux server will looks like this:

/usr/lib/perl5 //usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl .


Methode 2: Alternatively you can use #perl -V to find out included paths along with other information's

Use perl -V to see the include paths @INC

The output from Linux server will looks like this:

/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl

No comments:

Post a Comment