>> Read more trending stories  

Perrette went to Twitter to describe how she was attacked by a "psychotic homeless man."

Perrette said the man grabbed her, punched her and told her how he was going to kill her, The Associated Press reported.

"There was an empty garage behind me and I knew if he got me in there I knew I was dead," Perrette said.

Los Angeles police officer Jane Kim confirmed the attack.

Police, with help of a friend and neighbor of Perrette's, tracked down David Merck a few blocks away from the home.

Mereck was arrested and charged with aggravated battery, the AP reported.

"I am shaken and traumatized," said Perrette, who is an advocate for homeless. "My house, my beloved Hollywood. My beloved homeless people that I spend my life protecting. My life changed tonight. My ... I don't know."

She added "I almost died tonight."