exec() - The exec() function executes a system command AND NEVER RETURNS
system() - The return value is the exit status of the program as returned by the wait() call.
If you want output returned (not exit status) you have to use backtiks or the qx operator:
$return = `arguements here`;
$return = qx/arguements here/;
That is true if you want the $return string to contain the text that will be returned by the execution. If you want the errorlevel, it will not work.
Oh, if you wish to get perl to execute a batch file and get it not to display anything, you would do this:
$return = system("cmd /c batchFile.bat > nul");
Note: by passing off to a batch file, this will not be 100% portable.
Adrian