http://www.perlmonks.org?node_id=106970


in reply to using getopts::long and testing for command line options

Move the GetOptions line after the @ARGV test. The Getopt modules clear their elements from @ARGV when they process.

HTH
--
idnopheq
Apply yourself to new problems without preparation, develop confidence in your ability to to meet situations as they arrise.