use strict;
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;
In reply to Re: Re: comparing two arrays
by jdelmedi
in thread comparing two arrays
by jdelmedi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |