in reply to comparing two arrays and displaying scalar matches

Thanks everyone for help. I used the following lines. I'm a beginner at perl and did read the Perl book, but without jumping into the code and experiencing the problems and fixing them, there is no way to better learn :)
foreach $line (@array) { foreach $pat (@pattern) { if($line =~ /$pat/) { push (@new_array, $line);