in reply to Re: searching in array elements substrings contained in another array
in thread searching in array elements substrings contained in another array

Thank you for the ultrafast reply... but it seems it soesn't work... Or better: the first cycle works, but when it comes to use the previously processed array (@triple), a long list of warning comes:
Use of uninitialized value in pattern match (m//)
and the matches don't work. Printing the two arrays gives that the matches have not been removed... Any idea? Thank you again Livius
  • Comment on Re^2: searching in array elements substrings contained in another array
  • Download Code

Replies are listed 'Best First'.
Re^3: searching in array elements substrings contained in another array
by ccn (Vicar) on Nov 17, 2008 at 20:37 UTC

    How can undef values fall into @triple array?

    Anyway here is the fix:

    foreach my $q (@quadruple) { @triple = grep {$_ and $q !~ /$_/} @triple; }
      Thank you ccn! Now it works wonderfully! I'm grateful for the precious help Best regards Livius