There was one time, someone asked me for small change in order to buy water. I offered him to buy the water without giving him the money. He turned away and kept walking. This is why I tend not to give money (and feel really bad about it).
I've been asked at gas stations for a few bucks to buy gas. That one always seems to be a scam.
I tend to give money to older people and people who are offering a service. There was a guy who hung out at a grocery store with a bottle of window cleaner and rags, and he'd clean your car windows for whatever you gave him.
If they're young, look fairly healthy, or look like druggies, I don't give. If they demand a certain amount (I've had someone demand $20 from me!) I definitely don't give.
I don't see beggars close up all that often. Here they're usually standing at an intersection with a sign. If you're on foot in the City, there's a lot of panhandlers, and I think you'd be begging yourself pretty quickly if you gave everyone a few bucks.