if ($aa == $bb or $cc == $dd and my $flag=1) { print "Bedingung stimmt\n"; print "jedoch durch 2. Teil zustandegekommen\n" if $flag; }