Trying to break the addiction to alcohol and painkillers has cost Matthew Perry more than $9 million.

As the American actor told The New York Times, he has completed more than a dozen stays in rehab.

Perry's fellow actors from the series "Friends," for which he starred as Chandler Bing from 1994 to 2004, would have given him unreserved support during his battle with addiction.

"They were understanding and patient," the 53-year-old praised his former co-stars Jennifer Aniston, David Schwimmer, Courteney Cox, Lisa Kudrow and Matt LeBlanc.

Perry compared the cast of the hit series to a group of penguins who are known for their togetherness.

"When a penguin is sick, the others gather around it and support it until it can walk on its own again."

Perry is said to have been off alcohol and opioids for 18 months.

Last year, the actor admitted to taking so many medications while filming Friends that he didn't remember several years as Chandler.