How do I find out which operating system I'm running under?

The $^O variable ($OSTYPE if you use English) contain the operating system that your perl binary was built for.