Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Reading notes in gedcom files?

by toolic (Bishop)
on Apr 26, 2010 at 17:21 UTC ( #836959=note: print w/replies, xml ) Need Help??


in reply to Reading notes in gedcom files?

I have not used the Gedcom module, but you might be able to get a better understanding of what the data looks like using Data::Dumper. For example:
for my $i ($ged->individuals) { print Dumper($i); }
This is Tip #4 from the Basic debugging checklist.

Replies are listed 'Best First'.
Re^2: Reading notes in gedcom files?
by StarkRavingCalm (Sexton) on Apr 27, 2010 at 14:43 UTC

    Thanks to both of you.

    It's leaning toward a formatting issue with the way the source program creates the Gedcom files.

    I'll post again with the final outcome.

    Thanks, Rich

      To close this off, it would seem the Notes field in Gedcom files can accept many formats.

      The script below works as originally expected.

      Thanks for the help.

      #!/bin/perl -w use strict; use Gedcom; my $ged = Gedcom->new(shift); $ged->resolve_xrefs; for my $i ( $ged->individuals ) { for my $n ( $i->note ) { print "========================================\n"; print $i->name, "\n"; if (ref $n) { print $n->get_value, "\n"; } else { print "$n\n"; } #print "========================================\n"; } }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://836959]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2017-10-17 01:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (218 votes). Check out past polls.

    Notices?