sub foo { bar() or die "we failed"; ni() or die "we failed"; return(1); }; die "it worked" if foo();