if ($string1 =~ /_aktuell_/) { $string2 = 'text1_text2_text3'; } else { $string2 = $string1; }