Hi Christian,
"Christian Stalp" <[EMAIL PROTECTED]> wrote:
> i try to create a table with HTML:Template
> for this I fill a array with hashes:
> while ( $zeile = $result->fetchrow_arrayref ) {
> $uebergabe{ name => $row->[0], link => $row->[1] };
> push ( @suchprofile, \%uebergabe );
> }
>
> But I got nothing but an empty table. What is wrong?
try adding the following to the top of your script:
use strict;
use warnings;
The uninitialized variable warnings that you see will alert you that, in
your while statement, you assigned each row's hash reference to a
variable named $zeile, but then attempted to retrieve the values from a
hashref named $row.
while ( my $row = $result->fetchrow_arrayref ) {
$uebergabe{ name => $row->[0], link => $row->[1] };
push ( @suchprofile, \%uebergabe );
}
should work much better for you.
hth,
-dave
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>