spickles has asked for the wisdom of the Perl Monks concerning the following question:

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?

Regards, Scott

Replies are listed 'Best First'.
Re: Exiting a call to exec()
by Perlbotics (Archbishop) on Jan 08, 2009 at 00:11 UTC

    system should do what you want... or backticks...(qx{..} in perlop)

      Perlbotics - system() worked perfectly! Thanks!