develooper Front page | perl.riscos | Postings from July 2004

Sorting

Thread Next
From:
Colin Foster
Date:
July 1, 2004 05:38
Subject:
Sorting
Message ID:
40a7a8c74c.torent@cjfoster.iosun.co.uk

Hi All,

I'm sorting a list in numerical order using
@new = sort {$b <=> $a} @old;

Is it possible to restrict the sort so that it only sorts on the first
4 digits.

Regards,
Colin.

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