From cpan: win32 support has been added (but not tested).
Next the OP wanted to figure out on how to do it, a cpan module (working or not) can help by looking at the source.
Since the OP did not provide any sign of effort (what he has tried, or which direction he's thinking), i point to the most logic place to start searching for it
update
anyway, i've found a better perl module on cpan, that would suit all needs
"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.