foreach my $element(@array1) { #I want to check if the value exists in @array2 #Any smart ways to deal with this? #This looks bad... foreach my $another_element(@array2) { if ($element eq $another_element) { print "Hey...\n"; } } }
Edit kudra, 2002-05-31 Changed title
Thanks!:)In reply to Comparing two arrays (was: any smart ideas??:) by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |