Well you can sidestep the issue slightly. Ask what do they need the money for? If they are hungry buy them a meal at a local cafe then buy some dry food (like crackers), canned meat such as spam that can be kept in a tin till needed and UHT Milk (milk in a cartoon that doesn't need to be refrigerated till opened. Don't forget some bottle water, also low alcoholic beer may be a subtle alternative if they don't have access to a clean drinking water supply within reason (In ye olde days, drinking beer was common during the day as drinking water was often polluted) [1]. Also vitamins and supplements too.
If they need money for the Bus or Train to get home, then buy it for them. Get a taxi (you hail/pick it not them) to the train or bus station (don't walk there in case its a setup and you get robbed on the way and don't use your own car)
However, everyone has a story. For every person who is desperate and needs money, they are others who abuse peoples kind genorisity. They may use the money to buy Crack or Heroin or they made need it to buy their baby some food. You simply don't know.
[1] http://www.healthguidance.org/entry/14208/1/The-History-of-B...