Worked for me, too... I did:
$ perl -e ' BEGIN { open my $f, "|sort>/tmp/uses.txt"; unshift @INC, sub { push @_, caller; print $f "module $_[2] uses $_[1]\n" } } do "bin/ponto" '
where bin/ponto is the name of some script of mine, and I got the following in /tmp/uses.txt:
module base uses vars.pm module Carp uses Exporter.pm module Compress::Zlib uses Compress/Raw/Zlib.pm module Compress::Zlib uses IO/Compress/Base/Common.pm
...
module main uses bin/ponto module main uses Date/Manip.pm module main uses locale.pm module main uses open.pm module main uses strict.pm module main uses utf8.pm module main uses warnings.pm module main uses WWW/Mechanize.pm module main uses YAML/Syck.pm
...
[]s, HTH, Massa

In reply to Re^2: How to keep track of INC hash? by massa
in thread How to keep track of INC hash? by jacques

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.