title: Perl Access Global arrays
body: <p>I have classA and I define a global array in classA</p>
  
  <pre><code>our @myArray = {"1","2","3","4"}
  </code></pre>
  
  <p>I have classB in which I have a object of classA. I tried accessing myArray as follows.</p>
  
  <pre><code>$my_obj_of_classA-&gt;{'myArray'} 
  $my_obj_of_classA-&gt;{'\@myArray'} 
  $my_obj_of_classA-&gt;{\@myArray} 
  </code></pre>
  
  <p>None of these work. I get an error saying:</p>
  
  <blockquote>
    <p>Global symbol "@my_array" requires explicit package name</p>
  </blockquote>