Just walking by (if approached while walking) works best for me. It's when you say anything (even no or sorry) that they think they can talk to you.
I've found the most persistent beggars to be in Firenze, Italy especially the 6 year old girls which is incredibly unnerving (not dangerous, just sad) and Chicago, USA where we were cornered, threatened (he said he'd shoot us, though we knew he was too poor to have a gun) and shoeshined out of $10.
Poor people lining the street asking for money are just annoying in comparison. I find the sophisticated beggars and pickpockets are more likely to be found in the US, Italy, France and Spain.