#!/usr/local/bin/perl # Argument options using Dispatch Tables use strict; use Getopt::Std; my %opts = (); getopts ('dhp', \%opts); %opts = ( # For each option, call appropriate subroutine. "-h" => \&help, "-d" => sub {print "\nRun DEV COMPARE\n";}, "-p" => \&PROD, "_default_" => \&default, ); sub PROD {print "\nRun Production COMPARE\n";} sub help {print "\nHelp text\n";} sub default {print "\nThat is not a valid option\n";}