Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

(tye)Re2: Sorting by_number

by tye (Sage)
on Sep 15, 2001 at 22:24 UTC ( #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? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2022-05-23 18:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (82 votes). Check out past polls.

    Notices?