Perl Monk, Perl Meditation PerlMonks

### Re^5: executing a .bat or .exe from within perl script ??

 on Aug 21, 2017 at 08:16 UTC ( #1197720=note: print w/replies, xml ) Need Help??

Hi Eric. I have used 'System' in the middle of the Perl script to launch .exe File. It launched successfully, But it will be in the pause mode until we close that .exe File. Ant then the rest of the code will run. Do you we have any other way that, the code should run until script end? I also tried using subroutines. But does not work. Hence instead i used 'exec'at the end of the script and then called a another part of Perl script.

• Comment on Re^5: executing a .bat or .exe from within perl script ??

Replies are listed 'Best First'.
Re^6: executing a .bat or .exe from within perl script ??
by Corion (Pope) on Aug 21, 2017 at 08:22 UTC

If you do not want to wait for the exe program to finish, you can use the Windows-specific form of system (see perlport):

system( 1, "C:\\Path\\to\\that.exe" ) == 0
or warn "Couldn't launch program: \$^E";
[download]

Create A New User
Node Status?
node history
Node Type: note [id://1197720]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2020-07-08 05:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?

No recent polls found

Notices?