Situational Awareness
As a retired behavioral psychologist, Army Vet., & CCL holder, my suggestions are:
"SITUATIONAL AWARENESS"! Know your environment, they way people look, move, and dress. Panhandlers are usually obvious from a distance. This also applies to those on street corners with signs "Will Work For Food". Maybe 1 in a 100 might work, but again it's mainly panhandling.
Move away from the target. Never give money: One or both hands are thus occupied and you are at a disadvantage. Don't "say" I'll "call the cops". Just put cell phone to your ear (if you are blocked in) and say "This is Detective xxxx, need immediage assistance at xxxxx." (or whatever).
Unless you are stuck in a "bad" part of town (e.g., with car trouble), you shouldn't be in that part of town (unless you are a cop or related).
Even if you are at the Mall, Convenience Store, Bourbon Street in NOLA, or other crowded place...again, SITUATIONAL AWARENESS goes a long way to avoiding confrontation and/or possible use of lethal force with risk of collateral damage.
Always leave your self an (escape) out. Avoid getting in a "box canyon". On the other hand, if you are in your daily commute in bumper to bumper traffic...well, try to stay on the inside lane (next to "off" ramp)...lol.