echo $x|perl -nE'while(/\d{5,}/){$b=$`;$m=$&;$a=$'\'';$m=~s/(?<=\d)(?=(\d\d\d)+\b)/./;$_="$b$m$a"}print'