... my $ref_old = &start_frag_nach($dbh, "1"); ... my $frame_top_menu = $hauptfenster->Frame( -borderwidth => "2") ->grid(-sticky => "nw"); $frame_top_menu->BrowseEntry(-label => "Verwalten von:", -variable => \$ref_gruppe->[0], -choices => \@{$ref_gruppe}, -colorstate => 'white', -browsecmd=> sub{$ref_old = &start_frag_nach($dbh, "2");$hauptfenster->update;print "$ref_old->{nachname}";}) ->grid( ... sub start_frag_nach{ my ($dbh, $id) = @_; my ($ref_old ); $ref_old = &frag_nach($dbh, "select * from kontakte where ID = ?", $id, "fetchrow_hashref()",); return (\%{$ref_old}); } sub frag_nach{ my ($dbh, $sql, $id, $befehl, $eintrag, $typ_in_wert, $typ, $tabellen_name, $spalten_name, $index_name, ) = @_; my ($sth, $ref, ); $sth = $dbh->prepare( "$sql" ); $sth->execute ($id); $ref = $sth->fetchrow_hashref(); $sth->finish (); if (defined ($eintrag)){ eintrag_hinzu(\%{$ref}); } if (defined ($typ_in_wert)){ #$ref_adresse = typ_in_wert_wandeln(\%{$ref}, "adresstyp_id", "adresstyp", $dbh, "beschreibung", "id"); } return (\%{$ref}); }