I think you can use Version.new on that and compare them reasonably directly? That said, comparison of version numbers is a bit of a minefield for exactly this reason: not everyone agrees on when to use string vs. numeric comparison, or what to do when one is numeric and the other isn't.
On Sat, Jul 28, 2018 at 2:41 AM ToddAndMargo <toddandma...@zoho.com> wrote: > On 07/27/2018 11:27 PM, ToddAndMargo wrote: > >>> On Sat, Jul 28, 2018 at 1:54 AM ToddAndMargo <toddandma...@zoho.com > >>> <mailto:toddandma...@zoho.com>> wrote: > >>> > >>> Hi All, > >>> > >>> Why does this work: > >>> > >>> if $CurlStr.chars > 200 { > >>> > >>> But this does not? > >>> > >>> if $CurlStr.chars gt 200 { > >>> > >>> 79 was not larger than 200 ???? > >>> > >>> > >>> Many thanks, > >>> -T > >>> > > > > On 07/27/2018 10:57 PM, Brandon Allbery wrote: > >> > is numeric comparison: (79 > 200) is false. gt is string > >> comparison: ("79" > "200") is true because "7" is lexically larger > >> than "2". > > > > so "7" was larger than "2". > > > > mumble, mumble > > > > > > Thank you for the second pair of eyes! > > > > -T > > I had been dealing with revision numbers (2.3.4-1234), > which are all stings, for hours and did not realize > I had an actual number! > > > -- > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Computers are like air conditioners. > They malfunction when you open windows > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net