Ending a sub in the middle its execution

When a subroutine is execting, what code can I put in it to stop it at at certain points, I knoww of ways to use if /thens and work around code that I don't want to execute, but I am looking for a way to just stop the rest of the subroutine from executing.