-
From: Balint, Jess [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 12:38
To: 'Wagner, David --- Senior Programmer Analyst --- WGO'
Cc: '[EMAIL PROTECTED]'
Subject: RE: sorting Numeric OR Character data
> If you want to see the data, then you would need to e
> If you want to see the data, then you would need to explain
> what you want.
>
Sorry if I was not clear. I would like to know if there is a block
equivalent to { $a <=> $b } AND { $a cmp $b } at the same time. If I use the
cmp style, my numbers get sort asciibetically and if I use the <=> I ca
1: 10
2: 15
10: 5
If you want to see the data, then you would need to explain what you want.
Wags ;)
-Original Message-
From: Balint, Jess [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 08:07
To: '[EMAIL PROTECTED]'
Subject: sorting Numeric OR Character data
Hello all. I have a small subfunction with a "for sort keys %hash" construct
in it. In my sort, I want to have { $a <=> $b } (numberic) sorting, but I
get errors when character data is entered. Is there anyway to tell numberic
vs character without looping through keys looking for m/\D/? Thanks.
je