How do I combine .EXE commands in Perl?
-
19-08-2019 - |
Question
I have a set of .EXE commands. How do I get all those commands run in Perl as a single file? Whats the process to call the .EXE files in Perl?
Solution
The Perl system()
function will do this:
#!/usr/bin/perl -w
system("prog1.exe");
system("prog2.exe");
OTHER TIPS
TThe way to call system commands from perl is to use
system("String containing command + args here")
or if you want to perform some processing on the output, you use backticks
`command + args here`
You can use all your normal perl string manipulation oneliners with the backtick as well.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow