Matthew Perry attended Alcoholics Anonymous meetings at Ozzy Osbourne's house.

In his posthumous memoir, Last Rites, Osbourne revealed that the Friends star attended AA meetings at his house prior to his death in October 2023.

"He used to come to our house for AA meetings, or so my wife (Sharon Osbourne) tells me," Osbourne wrote of Perry. "The funniest, most talented bloke. And he was trying so hard to stay on the right path."

The late Black Sabbath icon, who passed away in July, went on to say that he "felt so sad" when he learned of Perry's death. The actor died of an accidental ketamine overdose on 28 October. He was 54.

"Then one day he listened to his addiction telling him it was OK to get loaded, and that was it - game over," Osbourne wrote. "I felt so sad when they said he'd been found in his hot tub, unresponsive, with ketamine in his system."

He added, "He'd given everything he had to stay clean. But it wasn't enough."

Both stars had battled addiction for many years. In his memoir, Osbourne revealed that 2012 was the last year he "fell off the wagon".

Recalling that time, the rocker said that his wife Sharon "busted" him and sold the cars that he had bought while under the influence. He then attended 90 meetings in 90 days at the AA Log Cabin in Hollywood.

"It helped me, all that AA stuff," he recalled. "Got me started on the way back to being sober. If you're on your own, the voice in your head is too persuasive."

Osbourne had been sober when he died of a heart attack on 22 July. He was 76. Meanwhile, Perry opened up about his own sobriety in his memoir Friends, Lovers, and the Big Terrible Thing, which was released less than a year before his death.

Last Rites was released on 7 October.