in reply to anyway to combine these two steps?

$num =~ s/.*?20(\d).*/0$1/gs

Since \d always matches one digit, the sprintf is not really needed.