title: Reference main variable in a package
body: <p>I want to create a library with methods A(), B(), and C() which will be called hundreds of times in each perl program with different strings as parameters. Each method updates its respective array (@A, @B, and @C) so I don't want to pass the array by reference each time. Each perl program also some unique strings they add to the array, so I cannot have the array be created and only modified by the package.</p>
  
  <p>Is it possible to manipulate a shared array from the main program in a package without having to pass it through a subroutine? Is there a way to set an alias array or array pointer to reference the array in main?</p>
  
  <p>main.pl</p>
  
  <pre><code>use MyPackage;
  our @a;
  </code></pre>
  
  <p>MyPackage.pm</p>
  
  <pre><code>package MyPackage;
  $alias_a = @main::a;
  push @alias_a, "1";
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>$aref = \@main::a;
  push @$aref, "1";
  </code></pre>
  
  <p>edit: updated the OP with more background information.</p>