or download this
Global symbol "$dir" requires explicit package name at test.pl line 4.
Global symbol "$dir" requires explicit package name at test.pl line 5.
...
Global symbol "$file" requires explicit package name at test.pl line 6
+.
Global symbol "$file" requires explicit package name at test.pl line 7
+.
Execution of test.pl aborted due to compilation errors.