unless ( GetOptions ( "example=s" => \$par_example, # string needed # more options and switches.. "help" => \$par_help, # switch )) { my_show_help(); die "Error in command line arguments: $!"} if (defined $par_help){my_show_help();exit;} #### my ($stdout, $stderr, $exit) = capture { system( $cmd, @cmdargs ); };