in reply to references and functions

The short answer to your question is: don't use subroutine prototypes. In Perl they don't act like they do in C. They only exist so that you can use make your subs work like Perl's builtins (eg grep { CONDITION } LIST).

If you want to make sure that your subs are passed the correct type of argument, check your arguments in the sub. Generally, though, the assumption should be made that the caller is doing the right thing, and leave perl to catch the errors.

The really short answer is: If you need to ask, you don't want (or need) them.

updated