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

Re: sort from the smallest number to the highest number

Thread Previous
From:
Robin Sheat
Date:
January 29, 2004 21:30
Subject:
Re: sort from the smallest number to the highest number
Message ID:
20040130052834.GT7243@kallisti.net.nz
On Fri, Jan 30, 2004 at 01:17:38PM +0800, Boon Chong Ang wrote:
> 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,
In perldoc -f sort:
       sort SUBNAME LIST
       sort BLOCK LIST
so you need to either write a sub that will do the comparison, or an 
inline block of code. The perldoc for sort is large, and mostly composed 
of examples that will make it clear.

-- 
Robin <robin@kallisti.net.nz>                 JabberID: <eythian@jabber.org>

Hostes alienigeni me abduxerunt. Qui annus est?

PGP Key 0x776DB663 Fingerprint=DD10 5C62 1E29 A385 9866 0853 CD38 E07A 776D B663


Thread Previous


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