A man has been arrested in connection with the attack.
Perrette wrote that on Thursday night she was walking on the street near her home when the man grabbed her and struck her on the nose and forehead while threatening to kill her.
“There was an empty garage behind me and I knew if he got me in there I was dead,” Perrette wrote in an emotional account of the incident that she shared via Twitter.
Perrette, who plays a forensic investigator on the hit police procedural “NCIS,” said the man kept telling her his name was “William” and warning her not to forget it.
In her terror, she wrote, she replied to her attacker that she has a nephew with that name. The man punched her again, and then let her go, she wrote, letting her move away from him before collapsing on the sidewalk in shock.
“Some guy walked right past me with a dog that licked my face,” Perrette wrote. “He was on his phone, annoyed. Did nothing.”
Perrette later drew a sketch of the suspect for police, which helped lead to his arrest, she wrote.
Officers arrested David Merck, a 45-year-old transient, on Thursday and booked him for aggravated battery, said Los Angeles police spokesman Officer Ricardo Hernandez.
Merck is being held on bail of $100,000, according to online jail records which listed his birthday as Thursday, the day of the alleged attack.
Police declined to release more details on the case.
But Los Angeles police Sergeant Bob Ward earlier told the Los Angeles Times the man arrested in connection with the attack has a criminal record and had been “self-medicating” with drugs.
“Probably didn’t even know who she is,” Ward told the paper.
“NCIS,” which airs on CBS and portrays the activities of special agents from the Naval Criminal Investigative Service, is one of the most watched scripted shows on television and regularly has more than 15 million viewers.