if( do{$o->check(...); ! $o->state} ){ action.. }elsif( do{$o->check(...); ! $o->state} ){ action.... $o->blah() if ($o->state) { actions..check.. unless($r->state) { and so on...deeper and deeper... } } }