in reply to Using GetOpts::STD

If you want to do it perl5 way, you want Getopt::Std
use Getopt::Std; my %opts; getopt('i',\%opts); die "usage $0 -i file" unless $opts{i} and -f $opts{i}; ...
See also The Dynamic Duo --or-- Holy Getopt::Long, Pod::UsageMan!, and Getopt::Long::Descriptive