| mortgages2005@aol.com 2005-03-25, 3:55 pm |
| Hello! I have a file (flatfile) which has two lines to it containing
all the keys on line one and all the values on line two. I have put
this into a hash called hash. I'm trying to populate the fields of my
form with this data. This is the original data keyed in by someone.
There are 300+ fields in the form. Is anyone familiar with
HTML::FillinForm? I found another one called HTML::Defaultify but it's
not on my server as an installed module of perl. This module below is
supposed to "automagically" populate the fields on my form. It's not
working.
#!/usr/bin/perl -w
use HTML::FillInForm;
open (FILE, "../temp/tempdatabase.txt") or error("Can't open file!");
my @descr =<FILE>;
close FILE;
my %hash=();
my @keys=split(/\|/,$descr[0]);
my @values=split(/\|/,$descr[1]);
@hash{@keys} = @values;
print "Content-type: text/html\n\n";
while (($k, $v) = each %hash) {print "$k=>$v,"};
$html="../form1/loanapp.htm";
$fif = new HTML::FillInForm;
$output = $fif->fill(scalarref => \$html,
hash => \%hash);
|