in reply to Re: removing duplicated elements from array, with a difference
in thread removing duplicated elements from array, with a difference

Thanks for your help, but I've realised that I need to do the same problem except that the duplicate may be a particular pattern within an element. So therefore all those elements containing that pattern need to be removed. thanks again, paul
  • Comment on Re: Re: removing duplicated elements from array, with a difference

Replies are listed 'Best First'.
Re: Re: Re: removing duplicated elements from array, with a difference
by sauoq (Abbot) on Aug 28, 2002 at 19:03 UTC
    I've realised that I need to do the same problem except that the duplicate may be a particular pattern within an element. So therefore all those elements containing that pattern need to be removed.

    You may have to explain this further. To find the elements not matching a particular pattern you can use something like:

    @without = grep { !/PATTERN/ } @original;

    I'm not sure that addresses the issue you are trying to describe with the phrase "the duplicate may be a particular pattern within an element."

    -sauoq
    "My two cents aren't worth a dime.";