[Pdx-pm] sort issues.

Roth, Gabrielle gabrielle.roth at xo.com
Fri Aug 30 13:14:02 CDT 2002

>You will need to create your own sorting function 
>that respects the semantics you want.

Phooey.  That's what I was afraid of.  Thanks for the example, I will do
more research.

>> 2.  One of (1.1|1.10) goes missing;  I thought maybe because the <=>
>> evaluated them as equivalent, but it does this with the 
>"cmp" operator as
>> well.  I tried quoting the keys, but that didn't help either.
>They're numerically equivalent, so they both evaluate to 1.1.  
>I would be highly surprised if you had both in your hash.

The keys for the hash are the ports on a network switch, numbered 1/1,
1/2...1/24,2/1,2/2,...2/24...etc.  1/1, 1/10, 1/2, and 1/20 will all occur.
The utility that I am using to gather the data (snmp) returns these numbers
as 1.1, 1.2 etc, so I do end up with both 1.1 and 1.10 in my hash.

>I find it very surprising that quoting them didn't make a 
>difference, and would like to see an example of this.

You are right, it solves the problem of the disappearing element (doesn't
help my sort though!).  I am probably losing my mind from looking at this
for too long. ;)

"It's been lovely, but I must scream now."

More information about the Pdx-pm-list mailing list