--- Paul <[EMAIL PROTECTED]> wrote:
> The problem is in this line:
>
> sort { $ch{1} cmp $ch{2} } keys %ch
>
> sort() receives the list of keys from keys %ch, and passes pairs to
> be
> compared to the code block { $ch{1} cmp $ch{2} } as $a and $b. Try
> this:
>
> sort { $ch{$a} cmp $ch{$b} } keys %ch
I noticed too late that this should be a numeric compare:
sort { $ch{$a} <=> $ch{$b} } keys %ch
The other way will put 19 before 2.... :o/
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/