Perast is considered quite safe for solo female travelers. It's a small, quaint, and tourist-friendly town. The local population is hospitable and English is commonly understood in various places around the town. Crime rates are relatively low and street harassment is rarely reported. As usual though, it's important to take basic precautions such as not being out alone late at night and keeping your belongings secure.