how to execute multiline shell command in perl?
<p>I want to run shell command as follow in perl:</p>

<pre><code>tar --exclude="*/node_modules" \
--exclude="*/vendor" \
--exclude='.git' \
-zvcf /tmp/robot.tgz .
</code></pre>

<p>But it seems perl can not excute this:</p>

<pre><code>`tar --exclude="cv/node_modules" \
--exclude="*/vendor" \
--exclude='.git' \
-zvcf /tmp/robot.tgz .`;
</code></pre>

<p>Here is the error:</p>

<pre><code>tar: Must specify one of -c, -r, -t, -u, -x
sh: line 1: --exclude=*/vendor: No such file or directory
sh: line 2: --exclude=.git: command not found
sh: line 3: -zvcf: command not found
</code></pre>

<p>it seems perl treat each line as one command.</p>