in reply to Declaring Subroutines

Actually, it doesn't have to be at the top. It simply needs to be compiled before other bareword uses of it are compiled. This is sort of simillar to what happens during import during a use statement (which happens at the top of the compile).

No, you don't need to do it. Subroutines can be fully qualified, or hardly qualified at all. Thank goodness for TIMTOWTDOI. I prefer to look at bareword subs (usually).

my @a=qw(random brilliant braindead); print $a[rand(@a)];