for (...) { ... next if &conflict_exists; ... log ... } sub conflict_exists { ... if (...) { return 1; } ... return 0; }