in reply to subroutine question

Since you declare foo before you "foo;", there isn't a problem. Try putting the sub declaration afterwards and you'll see strict get mean.
Perl 4 and before you have to call functions with & prepended. For readability and because I do my subs after the main section, I use foo(). YMMV.