RE: Matching one array against another

2001-06-08 Thread Wagner-David
nown number of elements in here ); foreach my $MyKey (@list) { if ( exists $possible_matches{$MyKey} ) { # exists }else { # does not exist } } -Original Message- From: scott lutz [mailto:[EMAIL PROTECTED]] Sent: Friday, June 08, 2001 15:02 To: [

Re: Matching one array against another

2001-06-08 Thread Jeff Yoak
P.S. Using hashes will eliminate duplicate entries from both lists. My assumption in suggesting this was that that wasn't a problem, but it is something that should be made explicit. Cheers, Jeff At 03:24 PM 6/8/01 -0700, Jeff Yoak wrote: >Code to do what you are looking for is inserted in

Re: Matching one array against another

2001-06-08 Thread Jeff Yoak
Code to do what you are looking for is inserted into the loop below, with comments at the end. At 10:02 PM 6/8/01 +, scott lutz wrote: >I have a question that to me seems like it would be part of the foundation >of Perl. > >@possible_matches = qw( list of items to match against ); > > >@l

Matching one array against another

2001-06-08 Thread scott lutz
I have a question that to me seems like it would be part of the foundation of Perl. @possible_matches = qw( list of items to match against ); @list = qw( imagine that there is an unknown number of elements in here ); foreach $list (@list) { # now match againt