The quote given by Sankha is a great one and I love to read such things but the 1st training is very time-dependent and we have to learn to think critically and live our lives with good, highly informed, moderate principles of the Buddha considering relativities of our day.
Anyway... here is my time-and-place sensitive solution to the issue of seeing beggars everywhere:
We pay taxes that go to welfare so beggars... they should take opportunity of that welfare instead of just begging!
If anything IMO, you should explain the above to a beggar and see if they need help being taken to the social security office (so that they can apply). Also provide them with busfare to go back.
It really might be that easy to completely help a homeless person.
I have done an experiment and claimed homelessness before and received enough money to feed myself far more than amply and could actually live very comfortably so long as I stayed in a homeless center (or some other place) at night. It would be very easy to live as a monk on welfare... meditating in the jungle at day and finding shelter by night.
I have thought about it and experimented with it somewhat... I can verify that the system in the U.S. is very generous with food stamps program.
The homeless life that Buddha praised is much easier to do than people think!
[I'm glad I experimented with homeless survivalism because I always have that as a backup to compare to working 40 hours a week and straining to make house payments and bills.]
The reason homeless people suffer is entirely mental: they suffer from the mental dis-ease of scarcity and self-victimization.
I don't believe in donating money to help beggars though. It is quite naive to do so for a lot of reasons...