I make regular donations to a local homeless charity as I think this is the best way to help. I would never be sure if the money given to an individual would be used for legitimate/positive purposes.
Not all people who beg are after drug or alcohol money but some/many are and it is not always easy to tell from a short/superficial interaction.
Also not all by any means of people who beg are genuinely homeless and again it is hard for the average person to make the distinction during a short interaction.
What the genuine cases need are practical help and positive emotional support and I feel, though not perfect, homeless charities are best placed to do this.