#!/usr/local/bin/perl # Argument options using Dispatch Tables use strict; use Getopt::Long; my $result = GetOptions ( # For each option, call appropriate subroutine. "-h" => \&help, "-d" => sub {print "\nRun DEV COMPARE\n";}, "-p" => \&PROD, ); sub PROD {print "\nRun Production COMPARE\n";} sub help {print "\nHelp text\n";}