This is a difficult one and I don't know any rules governing their usage. To my North American ears, both sentences sound OK for the spoken language, but, I would use 'per' when writing. Also, "what is the price per square foot?" is correct but "what is the price a square foot?" sounds horrible. I hope this helps.