in reply to Re^2: Calling exec on exec
in thread Calling exec on exec

If you use the multi-argument form of exec

exec($SCRIPT, qq{-log="$logfile"}, qq{-level="$LOG_LEVEL"}, qq{-file=" +$job"});

the strings aren't subject to shell processing before being passed to the child (the script), so whatever you put here will be received. For example, the following three statements are equivalent.

exec('ls "foo bar"') -> shell passes [foo bar] to [ls] exec('ls foo\ bar) -> shell passes [foo bar] to [ls] exec('ls', 'foo bar') -> perl passes [foo bar] to [ls]

The problem is that you're using a bad syntax for your parameters. What if you have a file name that contains '"'?