OK,
Now I am trying to select only records that are in both files.  I am trying
to go through one file and then check if it is in the next.  I am
stumped?????
Snip

open VEH, $veh or die "Cant open it :$!";
open CKEY, $ckey or die "Cant open it :$!";

open WRFILE, ">$wrfile";
while (defined ($line = <VEH>)) {
chomp $line;
@data = split(/\;/,$line);
    $true = 0;
   foreach (<CKEY>) {
   next if ($_ ne $data[1]);
   $true =1
   }
if ($true eq 1) {
#$carcount=$carcount+1;
printf WRFILE ("0%9d",$data[0]);

print WRFILE $data[2], ";";
print WRFILE "\n";
 }
}
close VEH;

TIA


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to