On Jan 4, 2006, at 13:17, Robert Klemme wrote:

> Grehom wrote:
>> what am I doing wrong?  I wanted to sort primarily on count (second
>> position in array), then sub-sort alphabetically (first position in
>> array)
>
> Generally you need to do conditional evaluation based on higher prio
> results.  Using "||" or "or" won't help here (dunno what Perl does  
> here).

In Perl, 0 counts as 'false'.  Not so in Ruby.  For example:

         Perl  Ruby
1 || 0   1     1
0 || 1   1     0

So, in Perl, if the first comparison was equal, the result for the  
second comparison would be returned by the disjunction.

matthew smillie.