Perl: the Markov chain saw | |
PerlMonks |
Re^3: sorting an array with decimal pointsby syphilis (Archbishop) |
on Jan 15, 2018 at 02:50 UTC ( [id://1207254]=note: print w/replies, xml ) | Need Help?? |
Hi Laurent_R,
it might actually work thanks to the coercion of version numbers into decimal numbers imposed by the <=> operator Yes, the spaceship operator will always compare in numeric context - and I was quite confident that if the only problem with levW's was that it failed to sort in the correct order, then would fix that. But levW seemed to think that there was a problem re the decimal point (which I don't see), and I was a little unsure about other aspects of the requirements, so I shied away from investing much time into my reponse. Cheers, Rob
In Section
Seekers of Perl Wisdom
|
|