title: Perl: Special array @_ is not really an alias?
body: <p>The special array, <code>@_</code> , where all the arguments passed to a function are present, is actually an alias to the arguments passed. Hence, any change we make directly to this special array <code>@_</code> will reflect in the main as well. This is clear.  </p>
  
  <pre><code>#!/usr/bin/perl
  
  use warnings;
  use strict;
  
  $\="\n";
  
  sub func {
          print \@_;
          $_++ for(@_);
  }
  
  my @arr=(2..4);
  print \@arr;
  func(@arr);
  print "@arr";
  </code></pre>
  
  <p>For the above program, I expected the reference of <code>@arr</code> and <code>@_</code> to point to the same location since it is an alias. But it is not so.</p>
  
  <p>On running the above:</p>
  
  <pre><code>ARRAY(0x1b644d0)
  ARRAY(0x1b644e0)
  3 4 5
  </code></pre>
  
  <p>If they are pointing to 2 different locations, how the changes done in <code>@_</code> is reflecting in <code>@arr</code>?</p>
  
  <p>Am I seeing something wrong? Please advice.</p>