Perl General Tips

Where Are My Include Files?

Not sure where Perl is looking for its include files? Try this from the command line...

perl -le 'print for @INC'

Which should give you a report something like this...

/System/Library/Perl/5.8.1/darwin-thread-multi-2level
/System/Library/Perl/5.8.1
/Library/Perl/5.8.1/darwin-thread-multi-2level
/Library/Perl/5.8.1
/Library/Perl
/Network/Library/Perl/5.8.1/darwin-thread-multi-2level
/Network/Library/Perl/5.8.1
/Network/Library/Perl
.

This makes use of Perl's ability to run a programme off the command line, in this case, 'print for @INC' which simply means 'print out each element of the array @INC. As @INC is set every time Perl starts, this shows you where Perl will look for modules.



Find out more by searching Google here...

Google