title: How to echo to a file in perl instead of bash
body: <p>In bash, I'm use to echoing something to a file like this:<br></p>
  
  <pre><code>echo "$contents" &gt;file.txt
  </code></pre>
  
  <p><br>
  In perl, I have the say command doing this:<br></p>
  
  <pre><code>say for $jsondata-&gt;{"Name"};
  </code></pre>
  
  <p>I want to save that output to a file.<br>
  I tried</p>
  
  <pre><code>say for $jsondata-&gt;{"Name"} &gt;tempfile;
  </code></pre>
  
  <p>but its not working.</p>