use strict; my @file; my @report = qw(sqltable mike_test sarak_mike); open INFILE, "); my $i = 0; foreach (@file) { print "\@file[", $i++, "] = '$_'\n"; } print "\n\n"; 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"; } } #### Mike table loaded successfully 2001-11-26 00:34:58.61 with 284734 records. MiKe_Test table loaded sucessfully 2001-11-26 01:31:08.88 with 498 records. sarak_Mike table loaded successfully 2001-11-26 01:37:07.85 with 165 records. Inv_hdr table loaded successfully 2001-11-26 01:45:04.79 with 165321 records. #### @file[0] = 'mike' @file[1] = 'mike_test' @file[2] = 'sarak_mike' @file[3] = 'inv_hdr' @report value: 'sqltable' is not in @file.