954,523 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how do i call an .exe file from perl script

how do I call a .exe file from my perl script?

samatha.kilaru
Newbie Poster
1 post since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

have a look at www.perlmonks.org its a really good perl site

@args = ("command", "arg1", "arg2");
    system(@args) == 0 or die "system @args failed: $?"
Paul.Esson
Junior Poster
181 posts since Feb 2005
Reputation Points: 21
Solved Threads: 10
 

Basically, you can use the system command:

system("c:\somepath\some.exe");

or you can use backticks, such as:

`c:\somepath\some.exe`;

And yet another solution is to use the open command:

open(FH, "c:\somepath\some.exe |");
close(FH);
Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You