in reply to how to recognize windows and linux os

Check out $^O in perldoc perlvar.