exec(PROGRAM); $result system(PROGRAM); Both Perls exec() function and system() function execute a system shell command. The big difference is that system() creates a fork process and waits to see if the command succeeds or failsââ¬âreturning a value. exec() does not return anything, it simply executes the command. Neither of these commands should be used to capture the output of a system call. If your goal is to capture output, you should use the backtick operator: $result PROGRAM;
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.