in reply to Re: (jeffa) 3Re: Eliminating Trailing Zeros
in thread Eliminating Trailing Zeros
Much better than the options without reverse.my $g = ","; # Could be ' ' or '.' in other locales my $n = 1234567890; $n = reverse $n; $n =~ s/(\d{3})/\1$g/g; $n = reverse $n;
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
|
|---|