title: how to splice a reference array using perl?
body: <p>how to splice a reference array using perl? I'm trying to remove certain elements from a reference array used in a function.</p>
  
  <pre><code>    &amp;removeELement(@spliceArray);
  
      sub removeELement
      {
          my $ref_to_spliceArray = shift;
  
          foreach my $i (0 .. $#$ref_to_spliceArray)
          {
                if($ref_to_spliceArray-&gt;[$i] == /failed/)
                {
                      splice $ref_to_spliceArray-&gt;[$i],1; # this syntax does not work...
                }
          }
      }
  </code></pre>