Even
foreach $sdir (sort { $list{$a} <=> $list{$b} } keys %list)
?

And you've gotta wonder what that ``$i = 0'' is in there for. (Oops.)
_________________________
Bitt Faulk