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


in reply to First program revisited

too tired to answer directly to the code, but for the last two questions see this code:
use strict; use warnings; my @numbers = 4 .. 6; my $number_of_trailing_zeros = 3; my $commify_at = 3; @numbers = map { $_ .= "0" x $number_of_trailing_zeros; $_ =~ s/(\d{$commify_at})$/,$1/; $_; } @numbers; print "@numbers";
btw is there a special reason why some write use warnings before use strict?

anyway, HTH ;)