in reply to Help with decimals

This code solves the problem without "doing math".

#!/usr/bin/perl -w use strict; my $foo = 17432; my $bar = 3; $foo =~ s/([0-9]+)([0-9]{$bar})/$1.$2/; print $foo;

MP