http://qs321.pair.com?node_id=275226


in reply to Re: Eliminating Trailing Zeros
in thread Eliminating Trailing Zeros

$n=~s/\.|\.0+$//
That's broken. It deletes the period but leaves in the trailing zeros. This is better, and does what's requested:
s/\.?0*$//;

Gary Blackburn
Trained Killer