title: execute batch file inside perl
body: <p>How could i execute a windows batch file inside perl ??</p>
  
  <p>Here is the batch file</p>
  
  <pre><code>@echo off 2&gt;nul (&gt;&gt;test.csv echo off) &amp;&amp; ( set ret=0) || (set ret=1)
  @echo.%ret%&gt;test.txt
  </code></pre>
  
  <p>The above code checks if a file named test.csv is open or not. If open, it wil return 1 or else it wil return 0. I have saved this result in a test.txt file. </p>
  
  <p>If i use any html code inside of a perl file, i use this to exclude the html code. </p>
  
  <pre><code>print &lt;&lt;end_of_file; 
       &lt;html&gt;
            html code inside this
      &lt;/html&gt;
  end_of_file
  </code></pre>
  
  <p>Can someone suggest me how to include the batch file inside a perl code in similar fashion. </p>