sub isAllDataValid { my $return; if( ... ) { $return = thisTest(...); } elsif( .. ) { $return = thatTest(...); } else{ $return = theOthertest(...); } ... return !! $return; }