If you don't do error checking, backlinks may be the wrong approach. You probably want to use the system function. For more information about error handling, see the documentation.
Perl has a number of features for executing other scripts / commands:
- backticks /
qx{} If you want to read all the output right after the program ends exec If you do not continue your process as another program, you will never return if succesfullsystem If you are only interested in the success or failure of a teamopen If you want to pass information to or from a commanddo and require Run another Perl script here. Like C #include- There are modules for a three-way
open so that you have access to the STDIN , STDOUT and STDERR your program. For more information, see the relevant perlipc sections.
And always use the multi-parameter forms of these calls to avoid shell escaping (can be annoying and very unsafe).
source share