Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

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

by Anonymous Monk
on Aug 21, 2017 at 08:16 UTC ( [id://1197720]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: executing a .bat or .exe from within perl script ??
in thread executing a .bat or .exe from within perl script ??

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 (Patriarch) 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";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1197720]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found