I have never done this form Perl. But I _HAVE_ done it from the commmand line (and surely if you can do it from the command line you can do it from Perl!). Look
HERE for info, where you will also find a link to some Microsoft documents on the subject.