http://www.perlmonks.org?node_id=781304


in reply to Re^2: Use of %INC ?
in thread Use of %INC ?

Post JavaFan correction: Ignore this please for it is disinformation. Or, run s[\%INC][\@INC]g before reading.

Use it when you are trying to see just what kind of gunk^Wdirectory paths %INC is filled up with, when you know you have installed a module but perl is failing to find one.

Other similar use is when trying to sort out the module paths, say to clean up the duplicates.

Well, that is when I personally (have) use(d) %INC anyway.

Replies are listed 'Best First'.
Re^4: Use of %INC ?
by JavaFan (Canon) on Jul 18, 2009 at 19:32 UTC
    Use it when you are trying to see just what kind of gunk^Wdirectory paths %INC is filled up with, when you know you have installed a module but perl is failing to find one.
    Actually, in such a case @INC is far more useful than %INC. %INC just gives you information where Perl actually has found a module it loaded - it doesn't give you much useful information if it couldn't find a module.
    Other similar use is when trying to sort out the module paths, say to clean up the duplicates.
    Again, in that case, @INC is far more useful than %INC.
      Ah, indeed! I misremembered that. Thank you for putting a stop on spread of disinformation.