my $hashref; my $result = dir_size("C:\\temp", $hashref); print "File count = ", $hashref->{FileCount}, "\n"; print "Dir size = ", $hashref->{LowSize}, "\n"; #### int dir_size (dirname,dirinfo,permsdie=0,otherdie=0) PREINIT: AV *errs = newAV(); HV *newdirinfo = newHV(); unsigned long hightotalsize = 0; unsigned long lowtotalsize = 0; long filecount = 0; long dircount = 0; INPUT: SV *dirinfo; char *dirname; int permsdie; int otherdie; CODE: RETVAL = _dir_size (errs, permsdie, otherdie, dirname, &hightotalsize, &lowtotalsize, &filecount, &dircount); hv_store(newdirinfo, "Errors", 6, newRV((SV *)errs), 0); hv_store(newdirinfo, "HighSize", 8, newSVuv(hightotalsize), 0); hv_store(newdirinfo, "LowSize", 7, newSVuv(lowtotalsize), 0); hv_store(newdirinfo, "FileCount", 9, newSViv(filecount), 0); hv_store(newdirinfo, "DirCount", 8, newSViv(dircount), 0); dirinfo = newRV_noinc((SV *)newdirinfo); printf("Found %i files\n", filecount); OUTPUT: dirinfo RETVAL