in reply to Re^3: return from external subroutine
in thread return from external subroutine

It's the end-of-package true value, so that use and require succeed.

Replies are listed 'Best First'.
Re^5: return from external subroutine
by CountZero (Bishop) on Aug 24, 2007 at 12:18 UTC
    I understood that much but you don't need a return for it and I was just wondering if by adding the return you mess up some internal stacks or pointers and thereby have the main program fail mysteriously.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      The same rules as returning from a sub apply. If there's a return, the value there gets returned per the normal rules. If there's no return, the value of the last evaluated expression gets returned. The most correct way to end a module is with an explicit return.

        Thank you for this explanation! Scarcely a day goes by without increasing my knowledge when visiting this site.

        CountZero

        A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James