|
Hello, is this thing on?
I've used gedcom.pm to successfully build a set of GEDCOMs from a MS Access database. It works beautifully. However I would now like to build a script that can merge two gedcom's into a third new one. For right now I'm skipping the logic to deal with duplicate individuals and am simply trying to add the unique individuals from the second GEDCOM into the first. However, it appears I can not just assign the individual to a newly created one. Furthermore, it does not look like there is an easy way to step through all of the records for an individual.
Can anyone provide any guidance?
my $Gedcom1 = Gedcom->new($GedFile1);
my $Gedcom2 = Gedcom->new($GedFile2);
my $Gedcom3 = $Gedcom1;
foreach $Ind ($Gedcom2->individuals()) {
@Matches = $Gedcom3->get_individual($Ind->name);
if (@Matches) {
} else {
$NewInd = $Gedcom3->add_individual;
$NewInd = $Ind;
}
}
|