I use Windows' xcopy quite often, and I can't remember all the command line switches I use. So I wrote a short perl script to ask the user to enter a value for the source and destination. I store them to variables, and then use exec() to call xcopy with the variables and command switches. How do I get xcopy to hand control back to my program and exit when the file copy process is finished?