in reply to Re: not able to compare files
in thread not able to compare files
Next, read in your contacts and determine if they exist in your schedule:my %contacts; while (<FILE1>){ my ($person, $trash) = split(/\s/, $_, 2); $contacts{$person} = 0; }
Of course, if somebody appears twice in your contacts file, they'll print out twice too. While you're at it, be sure to use strict and warnings and be nice, remember to close your filehandles. You don't need to chomp() anything since you're going to want the carriage return when you print to file.while (<CONTACT>){ my ($person, $extra) = split(/\s/, $_, 2); print FILE3 "$person\t$extra" unless exists $contacts{$person}; }
- - arden.
|
|---|