title: What is the best way to delete a value from an array in Perl?
body: <p>The array has lots of data and I need to delete two elements. </p>
  
  <p>Below is the code snippet I am using,</p>
  
  <pre><code>my @array = (1,2,3,4,5,5,6,5,4,9);
  my $element_omitted = 5;
  @array = grep { $_ != $element_omitted } @array;
  </code></pre>