use Getopt::Long ; my $input = {output_type => 'default'} ; my @input_array = {output_type => 'default'} ; my $p = new Getopt::Long::Parser ; $p->configure('pass_through') ; my $getoptret = $p->getoptions( 'files|f:s' =>\@input_array->{files}, #filename(s) 'eventlist|e:s' =>\$input->{eventlist}, #name of the eventlist 'output_directory|o:s' =>\$input->{output_directory}, # desired output directory ); die "Error: Give input SEED volume\n" if (! -e @input->{files}) ; die "Error: Give name of eventlist that should be used\n" if (! $input->{eventlist}) ; die "Error: Give output directory\n" if (! $input->{output_directory}) ;