in reply to looking for simple solution
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.$size = (-s $directory);
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.
|
|---|