note
plaid
I'm not quite sure what you mean by the size of a directory.
If what you want is the actual byte size of the directory
itself, you can just do
<code>
$size = (-s $directory);
</code>
If what you mean by size is the size of everything within
it, you'll probably have to code something up by hand,
preferably using [File::Find] to handle your recursion. I
did a quick look on CPAN, but was unable to find any modules
to handle disk usage.
<p>
If you do want the size of everything in the directory, and
you're on unix, you can mess around with playing with the
output of the system command 'du', but I don't recommend
this for any script that will have a long life.
18315
18315