http://www.perlmonks.org?node_id=512541


in reply to Re: Transform numeric string in numeric string
in thread Transform numeric string in numeric string

it's ok:
$num =~ s/(?!^)(.{3})(?=(?:.{3})*$)/.$1/g;
thank you!!