that others have described will get you started, and for your *nix uses will be just fine. However it will only say "Win32" for any Windows OS. To require Win NT/2K/XP you can check for the value of $ENV{OS} and make sure it is "Windows_NT". It will be empty (non-existant) for the Win9x OS's. If you want more granularity than that for Windows, you need to start grubbing through the registry.
which is pretty much precompiled bins.