What about being able to change the number of digits per grouping?

The one use I can think of atm is for certain cryptographic methods that
output lists of numbers in blocks of 5...

big_number.commify(" ",5);

Feel free to ignore this - I'm really bored :-)

Shaun Guth


On Thu, 2002-07-18 at 12:47, darren chamberlain wrote:

>   sub commify {
>       local $_  = shift;
>       my $c = shift || ",";
>       1 while s/^([-+]?\d+)(\d{3})/$1$c$2/;
>       return $_;
>   }
> 



Reply via email to