scheduled contact.txt --------- ----------- Sam 5:00 sam 324-232-3333 scott 4:45 Joe 235-309-3333 saleem 5:00 Saleem 323-747-0000 Ken 7:00 Ken 764-636-9999 Ken 8:00 open (FILE1, '<', 'scheduled') or die "Unable to open file1.txt for reading : $!"; open (CONTACT, '<', 'contact.txt' ) or die "Unable to open contatct.txt: $!"; while (my $list = ) { chomp $list; my @names = split(/ /, $list); my $name = ($names[0]); open (FILE3, '>>', 'Available') or die "Unable to open Tuesday.rep for writing : $!"; while (my $line = ) { chomp $line; unless ($line =~ m/^$name/) { #print FILE3 "$list\n"; print " the line is $list\n"; print " the sched is $line\n"; } } }