my $cli = Getopt::Something->new( "Usage: $0 [options] ...", [ "x|expect=s", \@except, " Add an exception" ], ... ); $cli->stop_on_argument( 1|0 ); $cli->run(); # or $cli->run( \@array ); if not @ARGV