develooper Front page | perl.beginners | Postings from January 2004

sort from the smallest number to the highest number

Thread Next
From:
Boon Chong Ang
Date:
January 29, 2004 21:18
Subject:
sort from the smallest number to the highest number
Message ID:
0ADA9E1EB91EBE4E869CCAA4D84F6A3904D3B6@pg-ismsg03.altera.priv.altera.com
Hi 
Just say I want to sort the row by using the fifth column data as reference from the smallest the largest number, if using sort, 
It will give me result like this


Abc 12.8 8 "left" 1 1.7
Def  13.8 9 "top" 0 19.7
gef  14.8 9 "left" 0 19.7
Dgf  12.3 9 "right" 4 2.6
bac 12.8 8 "left" 1 3.7
etg  12.8 2 "left" 7 34.7
efg  16.8 5 "right" 0 56.7
baf  32.8 7 "bottom" 5 79.8
cef  16.8 4 "right" 0 89.7

but what I want is like this, what so I do to achieve this effect? 

Abc 12.8 8 "left" 1 1.7
Dgf  12.3 9 "right" 4 2.6
bac 12.8 8 "left" 1 3.7
Def  13.8 9 "top" 0 19.7
gef  14.8 9 "left" 0 19.7
etg  12.8 2 "left" 7 34.7
efg  16.8 5 "right" 0 56.7
baf  32.8 7 "bottom" 5 79.8
cef  16.8 4 "right" 0 89.7



Thank you & best regards,
ABC





Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About