are you aware of the system command in perl to execute system commands and return control to the srcipt ?
perldoc -f system
it should work in both environments, though windows there are a lot of environments and u have to be specific
System command under Windows 7
The temporal difficulty with perl is u need to know C well to know the awesome.else u just keep *using* it and writing inefficient code