Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: how do I sort numerically on sections of data that is alphanumeric

by Brovnik (Hermit)
on Jun 26, 2001 at 23:44 UTC ( [id://91729]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # array is in @sorted
    my @sorted =
    ...
    sort {$a->[2] <=> $b->[2] or
          substr($a->[3],1) <=> substr($b->[3],1)}
    map  {[$_,split)] } @unsorted;
    
  2. or download this
    sort { $a->[2] <=> $b->[2] or $a->[3] cmp $b->[3] }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-19 20:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found