in reply to organizing program structure

I came across this http://computerprogramming.suite101.com/article.cfm/procedure__subroutine_or_function_ which might be the source of the confusion - "Subroutines are ... held in a similar light to the GOTO statement.".

Read the rest of the article! It is really about semantics, that's all. Perl subroutines are not like those described, they are more like functions or methods.

Replies are listed 'Best First'.
Re^2: organizing program structure
by shawnhcorey (Friar) on Jul 23, 2010 at 19:46 UTC

    Wow, is this for real? Subroutines are bad but methods are good. The only difference is their names. Also, you do use gotos but you call them names like "last" and "next" (for more details, see `perldoc -f last` and `perldoc -f next`.

    I won't get into the reasons why everyone uses gotos but they do. Just don't call them "gotos"; use the other names the language designers thought up for them. :)