Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Sorting non-standard elements

by artist (Parson)
on Oct 29, 2004 at 19:17 UTC ( #403878=note: print w/replies, xml ) Need Help??


in reply to Sorting non-standard elements

@data = <DATA>; @sorted = sort { ($a <=> $b) || ($a cmp $b) } @data; foreach (@sorted){ print; } __DATA__ 1.1.a 20.2 2.3.a 2.3.d 2.2 2.1.a 9.1.e 9.1.f 10.1.b 20.2 15.2.c

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://403878]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2020-05-28 08:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (165 votes). Check out past polls.

    Notices?