Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Numeric Sorting on Characters

by sundialsvc4 (Monsignor)
on Aug 15, 2013 at 13:24 UTC ( #1049587=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Numeric Sorting on Characters
in thread Numeric Sorting on Characters

/me nods ...

In which case, if careful research into the problem confirms that,:

  • Yes, that dash is legitimate data, and
  • there is no bug either in this program or in the upstream source, and
  • the downstream program(s) will know what to do, and therefore,
  • here is how we wish to sort it,

... (heh) ...

Then, as you know, the Perl sort verb relies upon a subroutine to do the sort-comparison, “and this is why.”   Although it is most frequently a “one-liner,” it can be a much more elaborate thing which receives two parameters, $a and $b.   (And, if you do several sorts the same way, it can be a separate, not-inline, subroutine that all of them use.)   All of which is well and good ... but I think that I’m in the majority thinking that a bug .. somewhere upstream .. has been uncovered here.


Comment on Re^3: Numeric Sorting on Characters

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2014-09-19 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (133 votes), past polls