The problem with that format is that any variable I have in the main routine, like $name above, is in scope for the whole file. If I'd misspelled $name in the argument list to say_hello(), it could have given rise to a hard-to-trace bug.
Put your subroutines first, at the top of the file, and the 'main' code at the bottom.
In reply to Re: Main routines, unit tests, and sugar
by BrowserUk
in thread Main routines, unit tests, and sugar
by stephen
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |