#!/your/perl/here use strict; use warnings; use Getopt::Declare; our $options; $options = Getopt::Declare->new( <<'OPTIONS' ); -one First parameter { defer { reject ( $one > $two => '\$one ($one) > \$two ($two)' ) } } -two Second parameter { defer { reject ( $one > $two => '\$one ($one) > \$two ($two)' ) } } OPTIONS print "one = $options->{-one}\n"; print "two = $options->{-two}\n"; __INVOKED_WITH__ perl declare.pl -one 10 -two 20 __OUTPUT__ Error: in generated parser code: Global symbol "$two" requires explicit package name at (eval 7) line 100. Global symbol "$one" requires explicit package name at (eval 7) line 144.