in reply to Re: anyway to combine these two steps?
in thread anyway to combine these two steps?

Another method, from the unnecessary ternary operator dept:

$output = (/20(\d)/ ? sprintf("%02d", $1) : format_error("that isn't valid data!"));