in reply to Comparing Arrays -> storing results in a third Array

You might try something using grep such as:

@array_1 = ('a', 'b', 'c'); @array_2 = ('c', 'd', 'e'); $list_1 = join '|', @array_1; @array_3 = grep { $_ =~ $list_1 } @array_2;

Replies are listed 'Best First'.
Re: Re: Comparing Arrays -> storing results in a third Array
by spurperl (Priest) on Aug 15, 2002 at 06:33 UTC
    Not the best way to go for a beginner, but hell this is neat ;-) ++