Eh, because you use fetchall_hashref.
So hashref is passed back.
you should use %$list.
However you can't join %$list.
So you should use fetchall_arrayRef(), then go through each row with a loop joining array of each line.
my $out;
foreach my $row (@$table) {
$out .= join(",", @$row) . "\n";
}
return $out;
Not tested, but theoritically should work.
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
So hashref is passed back.
you should use %$list.
However you can't join %$list.
So you should use fetchall_arrayRef(), then go through each row with a loop joining array of each line.
Code:
my $table= $DB->table("Insured")->select('Carrier', $cond)->fetchall_arrayRef(); my $out;
foreach my $row (@$table) {
$out .= join(",", @$row) . "\n";
}
return $out;
Not tested, but theoritically should work.
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...