With good hollow point ammo in a mid to heavy grain, and good placement, the 9mm will do the trick no problem.
I'd buy the 9, then instead of a 40 in a carbine, save up some cash and buy a AR type weapon. Maybe one that you can switch out barrels and change the caliber.
While the 40 is a nice weapon, it is just a "filler" between the 9 carbine and the 223/556 AR type weapon.
I just ordered a 6.5 conversion for one on my other toys. So between the 9mm, the 223/556 and the 6.5, I think i have the spectrum covered as well as i'll have a need for.