my $cmd = "SELECT titel FROM seiten"; my $sth = $dbh->prepare($cmd) || die $dbh->errstr; my @array = (); if( my $rv = $sth->execute ){   while($hash = $sth->fetchrow_hashref()){     push(@array,$hash);   }   if(@array){     $template->param( "SEITEN" => \@array );   }   else{     $template->param( "SEITEN" => \[ { titel => 'keine Seite vorhanden',  } ] );   } } else{   die "Konnte Seitentitel nicht aus seiten-Datenbank lesen: " . $dbh->errstr; }