elsif($length == 2) { $num = (substr($num, 0, 1) + 1) . ('0'x($length-1)); }