I have a PhD and do not regret it but my degree is in Physics not Computer Science. I enjoyed the work and believe that I was exposed people and ideas, that I would not have been otherwise, which have had a major impact my approach to work and problem solving. I would not pursue a Computer Science degree but would consider Physics or Mathematics instead while working on problems of interest to computer science. Study in either of these areas will give you a perspective fewer people have.