in reply to hash sorting

sub hashValueDescendingNum { length($b) <=> length($a) || $count{$b} <=> $count{$a} }

On "ties", <=> returns zero, causing the RHS of the || to be evaluated.

Replies are listed 'Best First'.
Re^2: hash sorting
by Anonymous Monk on Jan 26, 2009 at 18:30 UTC
    thank you very much