If you want to spend a little money and get a great gun, get the GLOCK. If you want to spend a lot of money and get a great gun, Get the HK.
The sad thing is that Glock prices have crept up so much in the past few years that they no longer represent the value they once did.
For about the same money as a Glock today, you can buy a superior firearm (Walther PPQ, P99AS) and for less money, there are plenty of pistols out there that are every bit as good as a Glock (M&P, SR9, etc.)