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


in reply to Integer to Money format

my $n = '4123456789'; $n =~ s/(?<= \d )(?= (?:\d{2})* \d{3} $ )/,/gx;

Replies are listed 'Best First'.
Re^2: Integer to Money format
by vinoth.ree (Monsignor) on Jan 20, 2011 at 08:13 UTC

    Thank you very much!