title: How can I reverse an array reference and store that in another array reference in Perl?
body: <p>I have this example:</p>
  
  <pre><code>my $numbers = [ 1, 2, 3, 4, 5, 6 ];
  my $newarray = [ reverse @$numbers ];
  </code></pre>
  
  <p>This example contains some synthetic code to make the <code>$numbers</code> arrayref appropriate for the <code>reverse</code> function. I would like to remove that code and do something more like this:</p>
  
  <pre><code>my $newarray = reverse $numbers;
  </code></pre>
  
  <p>I know this doesn't work, it returns:</p>
  
  <pre><code>)8936f22x0(YARRA
  </code></pre>
  
  <p>Is there a better way to reverse an arrayref in Perl <em>without changing the first line</em>?</p>
  
  <p><strong>UPDATE</strong>:</p>
  
  <pre><code>my $mails = [ reverse @{$mail_api-&gt;GetLogSendMail({ customer_id =&gt; $id })} ];
  </code></pre>
  
  <p>The idea is to make the above line of code better.</p>