in reply to GetOpts not working:

I believe that Getopt::Std requires a hashref to the options, not the hash itself.

getopts('f:', \%opts);

--MidLifeXis