in reply to Flat Database: Skip the first line

You can also *use* the first line!   Something like:
. . . close (ORGDB); my @fields = split/\|/, shift @ODB; . . . @vals = split(/\|/,$rec); my $outflds = join "&", map "$fields[$_]=$vals[$_]", 0..$#fields;
and/or make a hash for the textnames:
my %fldname = ( company_name => 'Company', street => 'Street Address', . . . ); . . . my %fldval; @fldval{@fields} = @vals; my $htmltxt = join '<br> <b>', map "$fldname{$_}:</b> $fldval{$_}", @fields; . . .

  p