in reply to Fastest way to calculate directory size in linux
$ perl -e 'print +(stat("/tmp"))[7]' 49152 [download]
I have no idea whether stat() works on Windows or not, but it's not mentioned in perlport.