Subject: | Routine appears to kill intermediate zeroes in decimal |
Date: | Mon, 6 Nov 2017 11:41:36 -0700 |
To: | bug-Number-FormatEng [...] rt.cpan.org |
From: | "William H. Haller" <bill_haller [...] autoelect.com> |
Number::FormatEng::format_pref(2308)
returns 2.38k
s/(?:(\.\d*[1-9])|\.)0+\z/$1/ (from perlmonks Aristotle) as trailing zero suppressor works, returning 2.308k.
--
s/(?:(\.\d*[1-9])|\.)0+\z/$1/ (from perlmonks Aristotle) as trailing zero suppressor works, returning 2.308k.
--
William H. Haller, Linux Systems Manager External Mail, Web, Security website: http://autoelect.com e-mail/IM: bill_haller@autoelect.com phone: 307-234-9311 direct: 307-233-0336 fax: 307-234-9438 snail-mail:Automation Electronics Information Technology POB 2670 Casper, WY 82602-2670 physical: 610 W Platte Road, Casper WY, 82602