in reply to How to read a GEDCOM file

I don't know anything about this format, but CPAN is your friend, there is a module Gedcom that sounds like it will be able to help you.

Note that your Perl source contains some invalid syntax*. Since you say you're just starting with Perl, I suggest starting with perlintro (which includes the tip to Use strict and warnings).

It might be easiest to start with a bit simpler task, like reading the 10th line of a simple text file. <update> Once you get to the section "Files and I/O" of perlintro, you should be able to see what to change in your current script for it to read the lines from the file. </update>

Also, the Basic debugging checklist contains some good tips, like to use Data::Dumper or Data::Dump to look at data structures, which will probably be helpful later on in inspecting the data that the module returns.

We'll be happy to help with any questions you may have while learning. For asking questions, it's always best to include the code you are working on, with things irrelevant to the question removed (although the code should at least still compile, see SSCCE), short sample input data, the expected output for that input, and the actual output you're getting, including any error messages (with line numbers intact). See also How do I post a question effectively?

* Actually, you've since edited your post to fix some of that. Please mark your updates as such, to prevent replies from being confusing - see How do I change/delete my post?

Update: Typo fix: Data::Dumper, not "Date::Dumper", thanks 1nickt!

Replies are listed 'Best First'.
Re^2: How to read a GEDCOM file
by JillB (Novice) on Nov 19, 2017 at 19:51 UTC

    Thanks for this advice. It should help me make better use of your Forum