Matthew Perry has spoken out in a revealing new interview to lift the lid on his debilitating battle with drugs and alcohol.
The Friends actor opened up in his new memoir, Friends, Lovers and the Big Terrible Thing, as well as in an interview with People.
MORE: Matthew Perry shares rare photo with goddaughter
Matthew revealed he was in a coma for several weeks and almost died as well as sharing heartbreaking details of his struggles.
WATCH: Health matters - Celebrities who are sober
He opens his memoir with the revelation that he was close to death just few years ago at age 49.
His colon burst from opioid overuse and he spent weeks fighting for his life. What followed was five months in hospital and nine with a colostomy bag.
MORE: Matthew Perry's appearance causes a stir during latest outing
MORE: Matthew Perry worries fans after sharing glimpse inside living room
Matthew admitted: "The doctors told my family that I had a 2 percent chance to live. 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."
Matthew has opened up about his life in his new memoir
During his many years as Chandler Bing on the hit show, he was on and off the wagon with his addiction to alcohol.
Matthew said that he thought he could handle it and there would be lengthy periods of time when he was clean.
SEE: Matthew Perry surprises fans with photo from inside his home - see why
However, at one point he confesses that he was down to 128 pounds and taking 55 Vicodin a day.
"I didn't know how to stop," he said. "If the police came over to my house and said, 'If you drink tonight, we're going to take you to jail,' I'd start packing. I couldn't stop because the disease and the addiction is progressive. So it gets worse and worse as you grow older."
Matthew feels incredibly thankful to be sober and alive
Matthew insists his castmates, including Jennifer Aniston, Courteney Cox, David Schwimmer and Matthew LeBlanc "were understanding, and they were patient," but ultimately he could only help himself.
He has been to rehab no fewer than 15 times and although he continues to battle the demons, he told People: "I'm pretty healthy now," and then joked: "I've got to not go to the gym much more, because I don't want to only be able to play superheroes. But no, I'm a pretty healthy guy right now."
He has thanked the cast of Friends for being supportive of him
The actor hasn't revealed how long he's been sober for this time but said: "It's important, but if you lose your sobriety, it doesn't mean you lose all that time and education.
"Your sober date changes, but that's all that changes. You know everything you knew before, as long as you were able to fight your way back without dying, you learn a lot."
He also has 14 surgery scars on his stomach to keep him on track. "That's a lot of reminders to stay sober," he added. "All I have to do is look down."
Now, he's focused on helping others and hopes by telling his story, he can save somebody else.
"There were five people put on an ECMO machine that night and the other four died and I survived," he says. "So the big question is why? Why was I the one? There has to be some kind of reason."
He added: "I'm an extremely grateful guy. I'm grateful to be alive, that's for sure. And that gives me the possibility to do anything."
Like this story? Sign up to our HELLO! Mail newsletter to receive all the latest royal and celebrity news straight in your inbox.