in reply to Use of %INC ?
There are usually quite a few directories listed in the @INC array and it is possible for a module to be installed in more than one of these directories. This might happen, for example, if you install a core module (one of the modules distributed with the perl program) from CPAN. Your installation from CPAN will usually create a new copy of the module in a different directory rather than overwriting the copy provided with perl. Your perl program will usually find the newer version, but this will depend on where it was installed and how @INC is set at the time the module is loaded.
By printing $INC{'Module.pm'}, you can find out which copy of the module was loaded.
By printing all of %INC (e.g. using Data::Dumper) you can find out what all of the loaded modules are.
|
---|