Is it possible to use the array version of perls system
command (i.e. the version that takes the first element as the command and the rest of the array as the cmd arguments) while also spawning a new process with Linux so that the system
command returns immediately e.g. to run a command like:
mycmd arg1 arg2 &
I've tried using system( ('mycmd', 'arg1', 'arg2', '&') )
but it just interprets the ampersand literally as a third argument.
I know I can just pass the whole command as a scalar to system
but I'm specifically wondering if it's possible to use the array version because the parameters for this command will originate from user options in a CGI script.