Photo: Michael Kovac/FilmMagic

Matthew Perry is heading home afterspending the last three monthsin the hospital followinggastrointestinal surgery.
“He’s good,” a source tells PEOPLE, adding that the actor is “going home finally.”
The update comes just hours after the 49-year-oldFriendsstar tweeted about his lengthy hospital stay.
“Three months in a hospital bed. Check,” hewroteon Friday, penning his first tweet in nearly six months.
In August, it was first revealed that the actor was on the mend after undergoing surgery. “Matthew Perry recently underwent surgery in a Los Angeles hospital to repair a gastrointestinal perforation,” a rep for the actor said in a statement to PEOPLE.
“He is grateful for the concern and asks for continued privacy as he heels,” the statement concluded.
A gastrointestinal perforation “occurs when a hole forms all the way through the stomach, large bowel, or small intestine. It can be due to a number of different diseases, including appendicitis and diverticulitis. It can also be the result of trauma, such as a knife wound or gunshot wound,” according toHealthline.com. A three-month bedridden recovery is normal given Perry’s condition.
RELATED VIDEO: Matthew Perry Says He ‘Can’t Remember’ 3 Years of Filming ‘Friends’ Because of Substance Abuse
Throughout his career, Perry has been candid about his health battles, including his struggles with alcohol and Vicodin addiction.
“I couldn’t stop,” Perrytold PEOPLE in 2013. “Eventually things got so bad that I couldn’t hide it, and then everybody knew.”
Ron Galella/WireImage

Perry has also become a voice for people struggling with addiction. “You can’t have a drug problem for 30 years and then expect to have it be solved in 28 days,” Perry toldThe Hollywood Reporterin a video for Phoenix House, a California-based treatment center where Perry has gotten treatment.
In honor of his road to recovery, Perry was presented with the 2015 Phoenix Rising Award.
“I’m an award-winning alcoholic,” Perry continued. “I shouldn’t be getting an award; Phoenix House should be getting an award.”
If you or someone you know is in need of help, please contact theSAMHSA substance abuse helplineat 1-800-662-HELP.
source: people.com