[OT] perl help on number modification

Bruno Wolff III bruno at wolff.to
Fri Jan 15 16:15:07 UTC 2010


On Thu, Jan 14, 2010 at 10:24:35 +0000,
  Dave Cross <davorg at gmail.com> wrote:
>   s/\.?0+$//;

While it wasn't covered explicitly in the examples I suspect that a lone
trailing decimal point should also be stripped so that the pattern should be:
s/\.?0*$//;


More information about the users mailing list