my $verbose = ("@ARGV" =~ /\-v/) ? 1 : 0; #: verbose mode if ("@ARGV" =~ /\-v/) #### use Getopt::Long; GetOptions ( 'v|verbose' => \( my $VERBOSE = 0 ), ); if ($VERBOSE) { ... } #### sub help { ... ... ... }