$var = sprintf("%s %02d, %04d", $month, $day, $year);
print "Today is $var.";
Should return "Today is August 24, 2000."
The number before the d is the minimum field width, eg. '2' would be printed ' 2' in the $day field. Since there is a 0 in front of the two, then the justification is filled with zeros, eg '2' would be printed '02'.