$y = 0; for $key (sort { $hash{$b} <=> $hash{$a} || length($b) <=> length($a) } keys %sizehash) { if ($y < 10) { $res = &commas($key); print "$res: $sizehash{$key}\n"; $y++; } } #### Total files: 104644 Largest file: c:\/My Virtual Machines/Gentoo/Gentoo Largest file size: 1,533,542,400 Smallest file: c:\ Smallest file size: 0 1,008,164,864: c:\/Program Files/dtSearch/UserData/personal/index_k_4.ix 1,533,542,400: c:\/My Virtual Machines/Gentoo/Gentoo 102,177,098: c:\/Data/obbd/Org Basic Building Binder/Building Binder.zip 135,019,052: c:\/My Virtual Machines/Gentoo/Gentoo.vmss 148,851,791: c:\/Data/Paraben/foch-beta.rar 569,366,528: c:\/data_transfer/Software/ISO/en_windows_server_2003_enterprise_vl.iso 144,244,736: c:\/Documents and Settings/davisone/Local Settings/Application Data/Microsoft/Outlook/archive_2003q3.pst 344,746,496: c:\/My Documents/My Virtual Machines/Windows95/Windows 98.vmdk 176,308,736: c:\/My Documents/My Virtual Machines/Windows95/Windows95.vmdk 524,288,000: c:\/Data/Personal.vol