title: How can I store entire contents of a Perl array to a scalar variable?
body: <p>How can I store entire contents of an array to a scalar variable.
  eg:</p>
  
  <pre><code>my $code = do { local $/; &lt;FILE HANDLE&gt;; };
  </code></pre>
  
  <p>This works fine for file handles but I need this for an array.</p>