I tend to think it is impossible to get the perfect pistol in a first and only purchase. Hence, many of us have a safe full of them

. But you can get a good one, so do your homework.
If you are learning to shoot, save yourself a lot of frustration and expense and get a 9mm. In my view, .40S&W, .45ACP, .357SIG, etc. are calibres to move on to later. The laws in Canada (and the laws of supply and demand) make 9mm a "small" calibre, because much of what is between .22LR and 9mm is either prohib or very uncommon. But in reality 9mm has plenty of snap to it and has as much "umpf" as most of us will ever need.
On calibre, if you are really starting from scratch on pistol shooting, you should have a .22LR and a 9mm to shoot - both for cost reasons, and because a .22LR lets you see what it is you are trying to do (line up the sights, squeeze the trigger, not jerk or push the gun) without needing all the experience in controlling the gun. I find that most people can't hit a damn thing with a 9mm/.40/.45 for at least their first few times out.
On model of pistol, get a gun that you think is "cool". Never underestimate that factor. You have to be happy with your purchase and want to go out and shoot it and learn to get good.
One thing I would suggest though, although the Glocks and M&Ps, etc. are cool guns, seriously consider something in a single action, or a single action/double action. You will be a very rare shooter indeed if you can shoot a Glock better than a gun with a good SA trigger as a rookie. You should have a look at the IMI "Baby Eagle" and also the various CZ guns. At a little higher price point you get into the SIGs, the HKs and the Berettas.
Just my 2 cents. I found learning to shoot pistols to be both fun and frustrating. When I shoot (other than when I am shooting rapid fire, or self defense-style drills) I want to hit where I am aiming (or real close), every time, every shot - and single action triggers do a lot to get you there.