foreach $i (1 .. 99) { if (bedingung1($i)) { if (problem_code() < 0) { behandle_problem(); } } }