$digits =~ s/^(\d)$/0$1/; # add leading zero if only one digit # 0->00 1->01 2->02 etc.