murugu has asked for the wisdom of the Perl Monks concerning the following question:
Greetings Monks,
Working on a Perl script in which I need to call a third party executable. The executable is interactive and asks lots of random questions to the invoker. I want to invoke the executable from the Perl script and give the control to the script runner(invoker). Once the executable is filled with all the details, I want to have the control back in my script and to continue with the remaining code.
# Lots of random code # unless (fork()) { exec "inter.exe", "--active"; } # Some remaining code
The above approach is not working as it is not getting executable in interactive phase. I can not directly use exec here as it will obliterate the existing process.
Regards,
Murugesan Kandasamy
use perl for(;;);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Taking control back once Interactive script completes
by hippo (Bishop) on Feb 26, 2020 at 16:33 UTC | |
by afoken (Chancellor) on Feb 27, 2020 at 20:00 UTC |
Back to
Seekers of Perl Wisdom