in reply to Formatting a number

If your system supports it:
$ perl -le'$x = 123456789; print qx/printf "%\047d" $x/' 123,456,789
Hopefully the next version of Perl will support the ' flag for printf(3)   :-)