That is way out of line. A professor has no right to make a personal comment about your appearance or ask you to do anything to change it. you could actually make a complaint against your professor if you choose.
You asked about... In the work place, some companies have different policies.
however, my husband works at Microsoft and they are one of the most successful computer companies in the world and i have seen many people there in different states of dress and appearance... from super long hair on the men to people wearing flip flops and sweatpants... My sister however is an engineer at a different yet similar company and they are Very strict about what their employees wear etc. So, it really depends on the company. some companies will care, some will not. I work in social work... no one cares what we look like as long as we're presentable
At any rate... be yourself and try to find a company that fits you. but if a company wants to pay you 80,000 and wants you to have a clean cut image... take the job and cut your hair
Sweetpea