Help for this page

Select Code to Download


  1. or download this
    $number=1234567; # with commas, should be "1,234,567"
    $number=~s/(\d)(\d{3})\b/$1\,$2/g;
    
  2. or download this
    while($number=~s/(\d)(\d{3})\b/$1\,$2/g){
     # nothing here -- how silly is this?
    }