getamap, welcome to the forum, it is good to have you on board. As you can see everyone just about has there own idea of the best gun. I would suggest going to a gun range that rents different pistols and try several out, and that way can you see what fits you the best, before you are out a lot of money. Both of those you mentioned, the Springfield XD40 Sub-Compact and Glock 23, are excellent guns, but find which one fits your hand and your personal needs.
Good Luck & Welcome!
-geo