in reply to Re: number comparison with a twist
in thread number comparison with a twist
I did not at all consider this solution, unfortunately, that also means I posted a too simplified prototype.
The API can return the price with variable leading and trailing digits, so 19.900000 is a valid result as is 123.2 so a bit of an extension is needed:
$price_string .= '0'; $price_string =~ s,^(\d+)\.(\d{2})0*,${1}${2},;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: number comparison with a twist
by parv (Parson) on Mar 02, 2020 at 15:42 UTC | |
by anotherguest (Novice) on Mar 02, 2020 at 15:54 UTC | |
by pryrt (Abbot) on Mar 02, 2020 at 16:10 UTC | |
|
Re^3: number comparison with a twist
by LanX (Saint) on Mar 02, 2020 at 17:57 UTC |