A woman's throat was slashed Thursday night with a piece of glass by a homeless man, police said.

According to the NYPD, the man put one arm around the woman's shoulder while he was behind her on Thursday night at about 8 p.m. between Smith Street and Second Avenue in Gowanus. The man, identified by cops at 37-year-old Luis Perez, held a piece of glass to the woman's neck, cops said, and told her not to scream, which she did.

"It was a little scary. I just thought, how can I get the attention of people so I can get help?" the woman told CBS 2. "He told me to let go. I was like pulling his arms off, because he had a piece of glass on my neck."

After he let go, Perez, who lives in a Manhattan homeless shelter, walked away and police caught him walking across the street less than an hour after they were called.

A police spokesperson told Gothamist the 24-year-old woman was treated for her injuries at Methodist Hospital.

Perez was charged with assault and criminal possession of a weapon. He also has prior arrests for possessing heroin and fare beating, police said. Perez was arraigned on Friday in Brooklyn Criminal Court and will return on October 25th.