What is the difference between %INC and @INC in Perl?
What is the difference between %INC and @INC in Perl?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The @INC array holds all the file system paths where Perl will be looking for modules when you use or require them.
After use or require, the %INC hash will contain the loaded modules and where they were loaded from.
Examples from my laptop:
@INC:
and %INC:
(%INC contains Data::Dumper because I used it to quickly dump those two values).