if (my $ergebnis = $sth->fetchall_arrayref( { value => 1 } )) { if ($ergebnis->[0]->{value} == 1) ...