My GEDCOM file has 5,174 lines in it, and the code below is intended to print out each line on the screen.
Each line contains a string of alphanumeric characters The only problem is, the output display starts at line # 723 and goes right through to the end. Even the count number is not shown as the first line of output of this code.
I use Padre as my Perl editor and compiler, and the results of 'run' are shown on the screen c:\Dwimper\perl\bin\perl.exe You can see an image of that screen here:
http:\\www.dasq.com.au\perl
If I change the counter to show only the first 20 records, then they all show correctly, including the records count number.
Would anyone like to comment on why this is so, please?
regards to all you generous Monks. Be gentle.
Jill
#!/usr/bin/perl use strict; use warnings; my $file_in = "C:/Users/Joe/Documents/Genealogy/birdt.ged"; open my $FILE, "<", $file_in or die "could not open $file_in $!"; + # three-argument open syntax my @ged = <$FILE>; # slurp the file contents into + @ged my $count = $.; print "no. of records: $count \n" ; # counting the number of recor +ds my $i=0; # stepping through the array $ +count = 5174 for ($i= 0; $i<$count; $i=$i+1) {print "$i $ged[$i]\n"; }
In reply to Array size too big? by JillB
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |