Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Neither your sample nor your description make it clear how you want the data sorted. However the following may help you sort out whatever it it you want to do:

use strict; use warnings; my @array = map {$_->[0]} sort {$b->[5] <=> $a->[5] || $b->[3] <=> $a->[3]} map {[$_, /(\d+),(\D+)(\d+)(\D+)(\d+)/]} map {chomp; s/'//g; $_} <DATA>; print join "\n", @array; __DATA__ 31 '0,wupra00a0535' 147 '0,wuprm00a0539' 148 '0,wuprm00a0539' 149 '28,wppra02a0015' 150 '24,wppra01a0016' 151 '0,wupra00a0532' 152 '15,wppra01a0015'

Prints:

147 0,wuprm00a0539 148 0,wuprm00a0539 31 0,wupra00a0535 151 0,wupra00a0532 150 24,wppra01a0016 149 28,wppra02a0015 152 15,wppra01a0015
Perl is the programming world's equivalent of English

In reply to Re: schwartzian transform by GrandFather
in thread schwartzian transform by fionbarr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2023-03-21 17:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?