You may use $^O or $OSNAME to determine the operating system.
Check the perlvar tutorial in doubt. Windows is usually MSWin32.

In reply to Re: Program for Windows and Unix by weismat
in thread Program for Windows and Unix by Richi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":