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

Recommended Answers

All 3 Replies

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: $?"

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);

system("c:\somepath\some.exe"); is this command invoke the .exe or .exe property if it ivokes only the .exe then how i have to extract the .exe property

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.