Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Sorting non-standard elements

by artist (Parson)
on Oct 29, 2004 at 19:17 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://403878]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-20 07:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found