I have Batch file which will do tasks for me. I have to call this batch file from my PERL file.
I want this to be called Asynchronously. The task batch file will be doing will be time consuming and I don't want this Perl file to wait till the Bach file is over
This is what i tried for simulation
Batch file:
@ECHO off
ECHO ------Start of Batch file---------- >> C:\\temp\test.txt
Echo ------End of Batch file---------- >> C:\\temp\test.txt
pause
Reason I added Pause
is to simulate the aysnch. (Logically there if its Async there is no way to press enter in the batch file :-) )
My Perl code looks like this
system("CreateTicket.bat");
When I use system();
it is waiting for the batch file to complete its execution
I modified it with
"C://Work/Playground/Perl/CQ_createRTCTicket.bat"
; (with backticks Formatting problem here)
This also waits for the batch file to stop (I think because of Pause)
Or if my approach is wrong is there a way to simulate this async?
[I cant use any extra modules from CPAN]
Thanks,
Karthik