Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PBML] How to remove repetive value from array

Expand Messages
  • Arne Kloecker
    Hi, what would work is making a foreach loop wih the old array and push ing the values you want to the new array: foreach $item (@old_array) { if (condition)
    Message 1 of 2 , Aug 31, 2000
      Hi,

      what would work is making a foreach loop wih the old array and push ing
      the values you want to the new array:

      foreach $item (@old_array)
      {
      if (condition) {push @new_array, $item}
      }
      undef @old_array; #it's not longer needed

      maybe you could splice the array.. check perldoc -f splice

      Arne
    Your message has been successfully submitted and would be delivered to recipients shortly.