Try system('C:/BatchTest/test.bat') == 0 or print "error: $!\n";
(Update: maybe I should add that if system() fails to execute the command, it returns -1, and only then $! is guaranteed to hold a meaningful value... (so testing ... == -1 and print $! would be the proper way). I suggested to check for a system() return value of zero, as then it would still print "error:" even in the rare case that the batch command should execute but not exit with zero (which typically means an error occurred on the command's side...) )
In reply to Re: Unable to run batch file in CGI Script
by almut
in thread Unable to run batch file in CGI Script
by venkatesan_G02
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |