You are missing the (fat) comma:
use if $VersionOS eq 'Win', Win32::OLE => 'CP_UTF8';
From the documentation for if the syntax seems clear.
In reply to Re: use conditional
by hippo
in thread use conditional
by Takamoto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |