Matthew Perry Reveals He Was Finally Able to Stop Taking Drugs After Recovering from Colostomy

With new confidence in his sobriety, Matthew Perry is ready to share hisstory.

His new memoir, Friends, Lovers and the Big Terrible Thing (available Nov.1) chronicles his journey in life — and his harrowing battle with addiction.

“I wanted to share when I was safe from going into the dark side of everythingagain,” Perry, 53, tells PEOPLE exclusively in this week’s cover story. “I hadto wait until I was pretty safely sober, and away from the active disease ofalcoholism and addiction to write it all down. And the main thing was, I waspretty certain that it would help people.”

Matthew Perry 10/31Rollout

Matthew Perry 10/31 Rollout

Brian Bowen Smith

RELATED: Matthew Perry Opens Up About His Harrowing Addiction Journeywith a New Memoir: ‘I’m Grateful to Be Alive’

Perry opens his book with a frightening drug-related experience where he washospitalized for five months after his colon burst.

“I thought it would be grabbing. Especially to people who have this problem,and how dark it can get,” he explains. “The doctors told my family that I hada two-percent chance to live. That’s the time I really came close to my lifeending. I was put on an ECMO machine, which does all the breathing for yourheart and your lungs. Every doctor says it’s a Hail Mary. No one survivesthat. So the big question is why? Why was I the one that survived? There hasto be some kind of reason.”

The actor was in a coma for two weeks. “I woke up and realized I had acolostomy bag,” he recalls. “They said, ‘It’s all too messy down there. Wecan’t do surgery. But in about a year you can reverse that.’ It was prettyhellish having one because they break all the time.”

Matthew Perry 10/31RolloutMatthewPerry 10/31Rollout

Matthew Perry 10/31 Rollout

Brian Bowen Smith Matthew Perry

RELATED: Matthew Perry Says He Looks Forward to Being a Husband andFather: ‘I’m Not Afraid of Love Anymore’

The experience led Perry to one of his greatest resolutions — to stop takingprescription opioids.

“My therapist said, ‘The next time you think about taking OxyContin, justthink about having a colostomy bag for the rest of your life,'” he says. “Anda little window opened, and I crawled through it, and I no longer wantOxyContin.”

Story continues

Matthew Perry 10/31RolloutMatthewPerry 10/31Rollout

Matthew Perry 10/31 Rollout

Brian Bowen Smith Matthew Perry

Perry was also able to quit drinking after he had an experience in his kitchenwhere he believes he sensed God.

“It was this bright yellow object that became all-encompassing. I couldn’t seethe kitchen anymore,” he recalls. “It was just this light, and I felt lovedand understood, and in the company of God or whatever. My dad was right nextto me and we were holding hands and I was praying when it started, which issomething I rarely did. It was like God showed me what’s possible. And thensaid, ‘Okay. Now you go learn this.'”

Matthew Perry bookcoverMatthewPerry bookcover

Matthew Perry book cover

While he prefers not to disclose how long he’s currently been sober, he doesstill count each day.

“It’s important, but if you lose your sobriety, it doesn’t mean you lose allthat time and education,” he says. “Your sober date changes, but that’s allthat changes. You know everything you knew before, as long as you were able tofight your way back without dying, you learn a lot.”

When it comes to gratitude, Perry has learned that “everything starts withsobriety. Because if you don’t have sobriety, you’re going to lose everythingthat you put in front of it, so my sobriety is right up there,” he says.

“I’m an extremely grateful guy. I’m grateful to be alive, that’s for sure,” headds. “And that gives me the possibility to do anything.”

For more on Matthew Perry, pick up the latest issue of PEOPLE, onnewsstands everywhere Friday.

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

If you or someone you know is struggling with substance abuse, please contactthe SAMHSA helpline at 1-800-662-HELP.