Re: formatting a number

2003-07-04 Thread Jenda Krynicky
From: Robert Citek <[EMAIL PROTECTED]> > Hello all, > > I want to format a number so that it has commas as a separator. > Here's the code I came up with: > > my $num=12345678; > print scalar reverse( join(",", grep( /./ ,split > (/(...)/,reverse($num), "\n"; > > This works but was wondering

Re: formatting a number

2003-07-04 Thread Janek Schleicher
Robert Citek wrote at Thu, 03 Jul 2003 18:48:02 -0500: > I want to format a number so that it has commas as a separator. Here's the > code I came up with: > > my $num=12345678; > print scalar reverse( join(",", grep( /./ ,split > (/(...)/,reverse($num), "\n"; > > This works but was wonderin

Re: formatting a number

2003-07-03 Thread Casey West
It was Thursday, July 03, 2003 when Robert Citek took the soap box, saying: : : Hello all, : : I want to format a number so that it has commas as a separator. Here's the : code I came up with: : : my $num=12345678; : print scalar reverse( join(",", grep( /./ ,split : (/(...)/,reverse($num),

formatting a number

2003-07-03 Thread Robert Citek
Hello all, I want to format a number so that it has commas as a separator. Here's the code I came up with: my $num=12345678; print scalar reverse( join(",", grep( /./ ,split (/(...)/,reverse($num), "\n"; This works but was wondering if anyone might suggest a better method. Regards, - Robe