Last year, Perry told Diane Sawyer that Aniston remained a constant friend to him through the ups and downs of his addiction and sobriety

Jennifer Aniston; Matthew Perry

Jennifer Aniston; Matthew Perry. PHOTO: KEVIN MAZUR/GETTY IMAGES; CHARLES SYKES/BRAVO/NBCU PHOTO BANK/NBCUNIVERSAL VIA GETTY IMAGES

Matthew Perry had a constant friend in Jennifer Aniston.

Last year, the actor — who died on Saturday at the age of 54 — opened up about how his Friends costar, 54, stayed in close contact with him through the ups and downs of his addiction struggles and sobriety journey.

“She was the one that reached out the most. You know, I’m really grateful to her for that,” Perry said of Aniston in an October 2022 interview with Diane Sawyer.

Perry also revealed that it was Aniston who initially confronted him during their time filming the hit sitcom when his addiction became evident to his castmates.

“Jennifer, she says, ‘We know you’re drinking,'” Sawyer prompted him in the interview.

“Yeah, imagine how scary a moment that was,” Perry responded.

“I should have been the toast of the town, but I was in a dark room meeting with nothing but drug dealers and completely alone,” he later added of being gripped by his addiction amid the height of his TV career.

NEW YORK, NY - 1995: American actress Jennifer Aniston and Canadian-American actor Matthew Perry of the television comedy, Friend's, attend the 1995 NBC Fall Preview circa 1995 at the Lincoln Center in New York, New York. (Photo by Ron Davis/Getty Images)

Jennifer Aniston and Matthew Perry in 1995. RON DAVIS/GETTY

In a 2022 interview with PEOPLE, Perry recounted a dark time during his Friends reign when he was taking as many as 55 Vicodin pills a day and his weight had dwindled to just 128 pounds.

“I didn’t know how to stop,” he explained. “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.”

While Perry said he tried to hide the signs of his spiraling addiction from Aniston and his other costars, they all knew he was struggling — and they tried their best to support him.

“[They] were understanding, and they were patient,” he recalled. “It’s like penguins. Penguins, in nature, when one is sick, or when one is very injured, the other penguins surround it and prop it up. They walk around it until that penguin can walk on its own. That’s kind of what the cast did for me.”

Perry told PEOPLE he thought he could lean on his trademark humor — and his coveted gig on the show — to keep him going.

“I thought being funny all the time was how I would get through,” he said. “I thought [Friends] was going to fix everything. It didn’t.”

Perry said Aniston continued to check in on him as he battled addiction

When Perry finally managed to get sober, he spoke about how grateful he felt to be on the other side of his addiction. “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,” he said.

Reflecting back, Perry said the dark times he experienced — including almost dying at age 49 after his colon burst from opioid overuse — made him stronger “in every way.”

“What I’m most surprised with is my resilience. The way that I can bounce back from all of this torture and awfulness,” he told PEOPLE.

He decided to share his deeply personal story in his memoir Friends, Lovers and the Big Terrible Thing in order to be the kind of lifeline for others that Aniston was to him.

“I think they’ll be surprised at how bad it got at certain times and how close to dying I came,” he said of the rawness of the experiences he wrote about.

“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,” he continued. “So my hope is that people will relate to it, and know that this disease attacks everybody. It doesn’t matter if you’re successful or not successful, the disease doesn’t care.”