Matthew Perry said he spent “probably $9 million trying to get sober” while battling a substance abuse addiction to both drugs and alcohol for decades.