sub foo { my $rc = 0; do { $rc = 1, last if $fehler1; $rc = 2, last if $fehler2; } while(0); return $rc; }