Matthew Perry is opening up about his harrowing battle with substance abuse in his new memoir, and revealed in a recent interview that he’s spent millions on his decades-long struggle to get sober.

Discussing his new book Friends, Lovers, and the Big Terrible Thing with the New York Times, the “Friends” star covers some of the memoir’s more shocking revelations of how he suffered from his alcoholism, ranging from the time he bit down on a piece of toast and several of his teeth fell out to his realization that, by age 49, he had spent more than half of his life in sober living facilities and treatment centres.

As Perry told the Times, he had a strange reaction when he completed recording the audiobook for the memoir, thinking to himself, “Oh my God, what a terrible life this person has had!” Then it hit him. “Wait a minute, it’s me! I’m talking about me,” he recalled.

READ MORE: Matthew Perry Nearly Died While Battling Drug And Alcohol Addiction: ‘I Had A 2 Percent Chance To Live’

Perry also looks back back to how his teenage drinking — cheap wine and Budweiser — eventually escalated into a massive addiction to prescription painkillers that ruled his life.

“I would fake back injuries. I would fake migraine headaches. I had eight doctors going at the same time,” Perry told the Times. “I would wake up and have to get 55 Vicodin that day, and figure out how to do it. When you’re a drug addict, it’s all math. I go to this place, and I need to take three. And then I go to this place, and I’m going to take five because I’m going to be there longer. It’s exhausting but you have to do it or you get very, very sick. I wasn’t doing it to feel high or to feel good. I certainly wasn’t a partyer; I just wanted to sit on my couch, take five Vicodin and watch a movie. That was heaven for me. It no longer is.”

READ MORE: Matthew Perry Reveals Jennifer Aniston Was ‘Friends’ Star Who Helped Him Most During Addiction Journey

According to Perry, he has now been sober for 18 months, meaning he had only recently become clean when the “Friends” reunion aired in May 2021.

That journey, he reflected, has taken decades, and did not come without a cost — spiritually, physically and financially.

“I’ve probably spent $9 million or something trying to get sober,” he estimated.

While writing a memoir carries an implication that Perry’s struggles are in the past, that’s not the case.

“It’s still a day-to-day process of getting better. Every day,” he said. “It doesn’t end because I did this.”

READ MORE: Matthew Perry Confirms He’s Finished Writing His New Memoir

Ultimately, he added, he’s hopeful that by sharing his experiences he can help others going through similar situations.

“Now I feel better because it’s out. It’s out on a piece of paper,” he explained. “The ‘why’ I’m still alive is definitely in the area of helping people.”

Friends, Lovers, and the Big Terrible Thing will be released on Nov. 1.