in reply to Re: <p>Directory used % in Linux </p>
in thread Directory used % in Linux

a dirhandle is not a dirpath, you're using a system with a dirhandle, maybe you want '.' instead of $dir?
  • Comment on Re^2: <p>Directory used % in Linux </p>

Replies are listed 'Best First'.
Re^3: <p>Directory used % in Linux </p>
by pvaldes (Chaplain) on Feb 21, 2014 at 15:27 UTC

    Yup, you are right. But '.' was too trivial, that I wanted for my example the abstraction: "the current directory".

    With some delay, but a little research today led me to the solution. It was more easy than expected.

    use Cwd qw(); use strict; my $current = Cwd::cwd(); print `du -ha $current\n`;