$id = "geschichte"; $id2 = "geschichte"; if ($id eq $id2) { my $textname = "text"; } open(TEXTDATEI, "$textname.txt");