In his new memoir, Friends, Lovers and the Big Terrible Thing, Matthew Perry sheds light on his struggle with addiction, including how it almost cost him his life.

According to his People cover story, Perry opens his memoir with the story of how he almost died in 2018.

"I had to wait until I was pretty safely sober — and away from the active disease of alcoholism and addiction — to write it all down," Perry told People.

At the time, it was publicly known that Perry suffered a gastrointestinal perforation, but in reality, he was going through a much more severe health crisis.

The actor spent two weeks in a coma and was given a 2 percent chance of survival. He also spent five months in the hospital and had to use a colostomy bag for another nine months.

"I was put on a thing called an ECMO machine, which does all the breathing for your heart and your lungs. And that's called a Hail Mary. No one survives that," he told People.

Perry has undergone 14 surgeries on his stomach since recovering from the initial incident, which was caused by opioid overuse.

As reported by People, Perry's addiction first surfaced when he was 24 years old and just starting Friends. The actor played Chandler Bing, the king of sarcasm, on the iconic '90s hit sitcom.

At one point, he began using opioids, including Oxycontin.

"Season 9 was the year that I was sober the whole way through. And guess which season I got nominated for best actor?" Perry said of his years on Friends.

During a low point while filming the 10-season sitcom, Perry shared he was taking more than 55 Vicodin per day.

"I couldn't stop because the disease and the addiction is progressive. So it gets worse and worse as you grow older," he explained.

Perry said he has been to rehab 15 times, and he's currently sober.

"I'm a pretty healthy guy right now," he told People.

"I say in the book that if I did die, it would shock people, but it wouldn't surprise anybody. And that's a very scary thing to be living with. So my hope is that people will relate to it, and know that this disease attacks everybody," the actor added.

Friends, Lovers and the Big Terrible Thing hits shelves Nov. 1.

Celebrities Who Are Sober

More From 92.9 NiN