my $sql_query = <<"_EOF"; SELECT TS1.struktur_id, TS1.struktur_txt, TS1.links, TS1.rechts FROM t_struktur AS TS1, t_struktur AS TS2 WHERE TS1.links BETWEEN TS2.links AND TS2.rechts GROUP BY TS1.links ORDER BY TS1.links _EOF my $sth = $Datenbank->DoSQLPrepare(sql_query=>$sql_query); $sth->execute(); my (%Label_Struktur, @Value_Struktur); while ( my $Zeile = $sth->fetch() ) { push (@Value_Struktur, $Zeile->[0]); $Label_Struktur{$Zeile->[0]} = "Zeile->[1]"; } my $struktur_menu = $cgi->popup_menu ( -name     => 'id', -values   => \@Value_Struktur, -labels   => \%Label_Struktur, ) );