X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=unicorn%2Funicorn_to_tsv.pl;h=3af493f56667efdf18eda321502c74efd59174a2;hp=e864a3177fd9b343b2cc6d825f87f8e40da72963;hb=3021cf9f0f0e23e6c003802e2425273618f56087;hpb=9333c7283a057acdfc93ec27b835ace56fdac6b0 diff --git a/unicorn/unicorn_to_tsv.pl b/unicorn/unicorn_to_tsv.pl index e864a31..3af493f 100755 --- a/unicorn/unicorn_to_tsv.pl +++ b/unicorn/unicorn_to_tsv.pl @@ -25,8 +25,9 @@ while (<>) { next; } - # Is this a FORM= line (which can be ignored)? - if ( /^FORM=/ ) { + # Is this a FORM= line? + if ( /^FORM=(.*)/ ) { + $records[$serial]{'l_form'} = $1; next; } @@ -52,7 +53,7 @@ while (<>) { # Looks like we've got some actual data! Let's store it. # FIXME: For large batches of data, we may run out of memory and should store this on disk. - if ( /^\.(.*?).\s+(\|a)?(.*)$/ ) { + if ( /^\.([A-Z]*?).\s+(\|a)?(.*)$/ ) { # Build the name of this field (taking note of whether we're in a named section of data) $field = '';