use warnings; use strict; use Getopt::Long; use Pod::Usage; my %options = ( based_on => 'tp', top => 1 ); GetOptions( \%options, 'based_on=s', 'top=i', 'man', 'help', ) || pod2usage(2); pod2usage(1) if $options{'help'}; pod2usage( '-verbose' => 2 ) if $options{'man'};