How To Properly Specify Command and Arguments to Exec in Perl

Published Date Author: , Posted December 11th, 2019 at 2:39:49pm

When using Perl’s exec() call, the best way to invoke it is as follows:

This syntax does some important things:
– passes a scalar value as the first argument which exec interprets as PROGRAM
– passes an array as the second argument which exec will use as the arguments to pass into PROGRAM

Note the use of the parentheses, which I have found to be required for proper behavior.

For more information, please see:

No comments as yet.

Leave Your Comment  Leave a comment

All fields marked with "*" are required.