in reply to Re: comparing two arrays
in thread comparing two arrays

Now it made sence!!!!!! It workded in the real world, Hats off to you Sir!!!

Replies are listed 'Best First'.
Re: Re: Re: comparing two arrays
by mattr (Curate) on Nov 25, 2001 at 12:56 UTC
    Understand that dupes are killed when hash is built. Though you did not specify that duplication of values is important, this test does not tell you that you have the same number of dupes of a given record in both record sets. Move SIG!
      You are right. I am still having a problem. The code does not recognise the values in @record although present in @file. When I try to print the $_ in the hash it's blank. Suggestions are welcome - I think I got overly excited --

      my $file='d:\mms_tableload.txt'; my @file=(); open(FILE,$file); @file = <FILE>; close(FILE); my @report = qw(sarak_mike mike); my %in_file = map{$_ =>1} @file; my $all_match = 1; foreach (@report) { if (! exists $in_file {$_} ) { $all_match = 0; print "\@report value: '$_' is not in \@file.\n"; } } print "All values in \@report found in \@file\n" if $all_match;