PERL: Mengetahui isi INC

From OnnoWiki
Revision as of 10:24, 12 February 2012 by Onnowpurbo (talk | contribs) (New page: The @INC array is a list of directories Perl searches when attempting to load modules. To display the current contents of the @INC array: perl -e "print join(\"\n\", @INC);" The follow...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The @INC array is a list of directories Perl searches when attempting to load modules. To display the current contents of the @INC array:

perl -e "print join(\"\n\", @INC);"


The following two methods may be used to append to Perl's @INC array:

  1. Add the directory to the PERL5LIB environment variable.
  2. Add use lib 'directory'; in your Perl script.

For more information, read the perlrun manpage or type perldoc lib


Referensi

Pranala Menarik