in reply to Error when using strict pragma

You're using GetOpt.pl, which is deprecated. From the header:
# This library is no longer being maintained, and is included for back +ward # compatibility with Perl 4 programs which may require it.

I think you'll be happier using Getopt::Std, which is part of the core distribution in 5.6. Getopt::Std provides and API for loading options into a hash, which can be lexically scoped using my.