my $response=doSomething(); sub doSomething { ... # fail return 0; }