The 43-year-old actor, who battled a number of addictions during his 10-year stint on the sitcom, became reliant on the powerful painkiller after a doctor prescribed it to him for injuries he sustained from crashing in the water, reported People magazine.
"I felt better than I ever felt in my entire life. I had a big problem with pills and alcohol, and I couldn't stop," Perry said.
The actor is now 'in a really good place' and hopes to settle down and have children in the near future.