Help for this page

Select Code to Download


  1. or download this
    $formatted_number = sprintf "%.3d", $number;
    print "Got $formatted_number!\n";
    
  2. or download this
    printf "Got %.3d!\n", $number;