I tried to check if XML::Simple is installed in my system or not.
perl -e \'while (<@INC>) { while (<$_/*.pm>) { print \"$_\\n\"; } }\'
>
$ perl -MXML::Simple -le 'print $INC{"XML/Simple.pm"}'
From the perlvar entry on %INC:
- %INC
The hash
%INCcontains entries for each filename included via thedo,require, oruseoperators. The key is the filename you specified (with module names converted to pathnames), and the value is the location of the file found. Therequireoperator uses this hash to determine whether a particular file has already been included.If the file was loaded via a hook (e.g. a subroutine reference, see require for a description of these hooks), this hook is by default inserted into
%INCin place of a filename. Note, however, that the hook may have set the %INC entry by itself to provide some more specific info.