in reply to "Subroutine basics" What does -1 mean ?
Have you looked at exit?
Basically, this ends the script and returns the exit code -1 to the calling process.