Note that you most likely want do use system() and not exec() in your example. That is, unless the Windows program in question takes care of sending whatever output you wanted to send.
Compare perldoc -f exec and perldoc -f system for more details.
--
Time flies when you don't know what you're doing