while (my @row = $sth_suchen->fetchrow_array()) { my %hash; for(my $i = 0; $i < scalar @order; $i++) { $hash{$order[$i]} = $row[$i]; } push @daten, \%hash; }