in reply to Regexp doubts

Because doing it by hand, even by an expert, is so error prone (not to mention completely illegible):
use strict; use warnings; use 5.010; use Number::Format; my $number = 1222333444.01234567; my $formatter = new Number::Format( -decimal_digits => '4', -decimal_point => '!', ); say $formatter->format_number($number); --output:-- 1,222,333,444!0123
Or, copy the solution from perlfaq.