Matthew Perry opens up about being a friend to those struggling with addiction

The "Friends" star talks about fighting his years of drug and alcohol abuse.

For more than a decade, Matthew Perry made millions of people around the world laugh as the sarcastic, lovable and at times awkward character Chandler Bing on the hit sitcom "Friends."

But behind the scenes, the now 53-year-old actor said he was fighting a hard-fought battle with drugs and alcohol that threatened his life and, on at least one occasion, nearly ended it.

Perry is now opening up about the secrets he kept hidden for so many years in his new memoir, "Friends, Lovers, and the Big Terrible Thing."

The actor sat down with ABC News' Diane Sawyer for an interview that will air on Oct. 28 at 8 p.m. ET on "20/20", and the next day on Hulu, and said he is sharing his story with the hope of helping sufferers and letting them know there is always someone there to help them.

"Obviously, because I was on 'Friends,' more people will listen to me. So I've got to take advantage of that, and I've got to help as many people as I can," Perry told Sawyer.

Perry said he had his first drink at age 14 while hanging out with friends.

"I remember that day very well in Ottawa, Canada. I had never drank before. And we just sort of drank this entire bottle of [wine]," he said. "And I lay in the grass and just was in heaven. I thought to myself, 'This must be the way that normal people feel all the time,' and I thought that at 14."

By age 18, Perry was drinking every day.

He said he is proof that addiction can enter any home and any life. His father John Bennett Perry was an actor, singer and model and his mother Suzanne Langford was a press secretary for former Canadian Prime Minister Pierre Trudeau. His parents divorced when he was young and both remarried.

Perry says he struggled with loneliness and self-doubt. He thought, as a young man, that success and fame might help heal him.

He had loved being in school plays and moved to California, where his father moved to after the divorce to try to pursue acting professionally. He began to book small roles on popular shows like "Beverly Hills, 90210."

At 24, he auditioned for and won the role of Chandler Bing in "Friends," and would go on to receive enormous critical and financial success for 10 seasons.

But behind the scenes, Perry went through periods of drinking excessively and hiding it from everyone. At one point, the show’s cast and creators gathered in his dressing room to express their fears for him.

Over the years Perry estimated that he went through detox 65 times and went to rehab 15 times.

While filming the movie “Fools Rush In,” Perry suffered an injury during a break from shooting. He was given a pill for the pain and said it was like warm honey entering his veins.

“I swear to God I think if I’d never taken it, none of the next three decades would have gone the way they did. Who knows?” Perry writes in his book.

Soon, his addiction extended to prescription painkillers. The actor said his pill problem worsened and, eventually, he was taking 55 Vicodin pills a day.

He said his body had built up such a tolerance that he needed to take more and more pills to stave off withdrawal. On some occasions, he told doctors he had fake injuries and migraines in order to secure the pills.

“The weirdest thing I did was on Sundays I would go to open houses and go to the bathrooms...in the open house and see what pills they had in there and steal them,” Perry said. “And I think they thought, ‘Well, there's no way that Chandler came in and stole from us.’

For Perry, one of the scariest moments came in 2018 when he was hospitalized for a perforated bowel. All of the years and quantities of the pills he was using paralyzed his digestive system and led to a medical emergency.

While in the hospital he contracted pneumonia and was put on life support. He said that of the five patients who were also placed on life support that night, he was the only one who survived.

After being in a coma for two weeks, Perry said he woke up to see his family at his bedside. During the whole time he was in the hospital, he was never left alone.

"One of the things I have to deal with is that my family rushed to the hospital and were told that I have a 2% chance to make it through the night," a teary-eyed Perry said. "And, you know, my mom heard that, and my dad heard that."

In the months and years since his coma, Perry has survived a total of 14 surgeries.

“I’ve surrendered, but to the winning side, not the losing,” Perry writes. “I’m no longer mired in an impossible battle with drugs and alcohol.”

He has made it his goal to help others who are struggling.

"When someone calls you for help and says, 'I'm in trouble,' what do you want to say to them first?" Sawyer asked.

"I say, 'Come over. Let's talk,'" Perry said. "And follow up, and help the person, and I see the light come on in their eyes. I have the answer because of stumbling so much. I could help them."

"Saving each other," Sawyer said.

"Saving each other, because he eventually figures out that [they're] saving me too," Perry said.

If you or someone you care about is struggling with addiction, confidential and free help is available at: FindTreatment.gov, the SAMHSA National Helpline at 800-662-4357 or for immediate help in a crisis situation call or text the national crisis lifeline at 988.

ABC News' Ivan Pereira and Mark Robertson contributed to this report.