Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    #
    ...
        my $num = shift;
        return substr("000000" . $num, -6 );
    }
    
  2. or download this
    ~/perl/perlmonks$ ./leading_zeroes.pl
     Num: 000007
    ...
     Num: 513465
     Num: 004444
     Num: 000029