I've finished the script: I have decided to share it here, although it's just a small script, but some readers might want to save it to their ~/.local/bin/ or wherever they keep their little tools. If the reader decides to save and run the script, most likely s/he'll need to install just one CPAN module, Filesys::DiskUsage.

#!/usr/bin/env perl # Last modified: 2026-03-11T20:39:00-04:00 use strict; use warnings; use Config qw( config_re ); use Filesys::DiskUsage qw( du ); # use Data::Dumper; my @r = config_re(q/\S+(lib|arch)exp/); my %eos; my @inst = map { ( split "=", $_, 2 )[0] } @r; my @dirslist = @Config::Config{@inst}; my $sl = 0; for ( @dirslist ) { $sl = length $_ > $sl ? length $_ : $sl; } $sl += 2; # horizontal spacing for my $tag (@inst) { my $f = $Config::Config{$tag}; $eos{ $tag } = [$f, du({ 'human-readable' => 1, 'sector-size' => 1024 } , $f )]; } # "vendorarchexp" is longest tag, 13 chars. do { no warnings 'uninitialized'; $eos{$_}[1] = ($eos{$_}[1] eq undef ? 0 : $eos{$_}[1]); printf qq^%-${sl}s %-13s %s\n^ => $eos{$_}[0] , $_ , $eos{$_}[1] } for sort keys %eos; #eof

For example, on a CygPerl installation the (system) perl generates the following nicely-formatted list:

$ perl ~/Scripts-finished/perlinstDirs.pl

/usr/lib/perl5/5.40/x86_64-cygwin-threads archlibexp 23.37M /usr/share/perl5/5.40 privlibexp 24.13M /usr/local/lib/perl5/site_perl/5.40/x86_64-cygwin-threads sitearchexp 61.46M /usr/local/share/perl5/site_perl/5.40 sitelibexp 186.12M /usr/lib/perl5/vendor_perl/5.40/x86_64-cygwin-threads vendorarchexp 17.58M /usr/share/perl5/vendor_perl/5.40 vendorlibexp 57.11M

Regards all,
    – Soren

Apr 24, 2026 at 05:14 UTC


In reply to Re: An anomaly with Filesys::DfPortable, I need your eyes by Intrepid
in thread An anomaly with Filesys::DfPortable, I need your eyes by Intrepid

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.