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

(tye)Re2: Sorting by_number

by tye (Sage)
on Sep 15, 2001 at 22:24 UTC ( [id://112643]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @sorted= grep { s#0.{4}(\d+)#$1#gs; 1 } sort
        grep { s#(\d+)#"0".pack("N",length$1).$1#ge; 1 } @{[ @list ]};
    
  2. or download this
    my @sorted= grep { s#0.{4}(\d+),(0*)!#$2$1#gs; 1 } sort
        grep { s#(0*)(\d+)#"0".pack("N",length$2)."$2,$1!"#ge; 1 }
        @{[ @list ]};
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-06-12 16:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.