your code won't compile ($st isn't declared).. How are the numbers you're getting not correct? But that aside, take a look at yesterday's thread Disk size manager in perl? .. Also, are you a linux system where you could just run du (in backticks, or open a pipe, etc)? not pure perl, but effective...