Note that our does not create variables, it merely tells Perl that you're going to be using the global variables you list. You should put the our outside of foo, and use local inside it. Then you're strict safe.
Caution: Contents may have been coded under pressure.