in reply to porting a script to windows

Furthermore, if you will have to maintain and support your script on several platforms, you might want to try to get rid of the external commands by looking for solutions in pure Perl. That makes cross platform scripts easier, most of the time.
Have a go on CPAN search to see, if what you need isn't already available.

...in my experience, it often is.

Cheers, Sören