http://qs321.pair.com?node_id=163552


in reply to Printing path to @INC

print "$_<BR>" for sort @INC;

Note: The paths listed in @INC are searched left-to-right, so it might be a good idea to leave it unsorted if you're using the output to analyze a problem with your code.

It just occurred to me that I may have misunderstood your request. If you'd like to print both keys and values from %INC (%INC and @INC are two distinct variables), you could use:

print "$_: $INC{$_}<BR>" for sort keys %INC;