Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Flat Database: Skip the first line

by petral (Curate)
on Jan 26, 2002 at 04:38 UTC ( [id://141697]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://141697]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-19 06:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found