As well as the require method already mentioned, there's also a standard module for this, if:
use if ($^O eq 'MSWin32'), 'Win32::OLE';
In reply to Re: conditionally include a module
by FunkyMonk
in thread conditionally include a module
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |