title: get last modified date of file with strawberry perl on windows
body: <p>I need to get the info on the file for when it was last modified using a perl script
  heres the relevant code: </p>
  
  <pre><code>#where $file equals "MyFile.txt"
  $backslash = "\\";
  $upTwoLayersHelper = "..$backslash..$backslash";
  @fileInfo = qx(forfiles /M $file /P $upTwoLayersHelper /C "cmd /c echo @fdate @ftime");
  </code></pre>
  
  <p>qx is a function in perl that allows the execution of a system command and redirects the output to a variable</p>
  
  <p>Ive already looked into using <code>stat</code> and it kept returning</p>
  
  <pre><code>Dec 31 of like 1960
  </code></pre>
  
  <p>so <a href="https://stackoverflow.com/questions/509576/how-do-i-get-a-files-last-modified-time-in-perl">this</a> did not work for me :/</p>
  
  <p>I used the variables <code>$backslash</code> and <code>$upTwoLayersHelper</code> to build 'safely' the path since windows likes to use \ rather than / and I tested to make sure that the variables interpolate within the qx(...here...) function call.</p>
  
  <p>My problem is the only output I get is</p>
  
  <pre><code>ECHO is on.
  </code></pre>
  
  <p>when I print the <code>@fileInfo</code> variable</p>
  
  <p><strong>BUT</strong> when I run the same command within the qx(...) function call <strong>outside</strong> of perl, and just in batch from the command line as a command it <strong>works</strong> and returns the correct date information</p>
  
  <p>what am I doing wrong in my perl script?</p>
  
  <p>Thanks for your time!</p>