use constant DEBUGGING => grep $_ eq "-d", @ARGV; #### my %options; BEGIN { # process @ARGV, putting results in %options } use constant DEBUGGING => $options{debug};