- or download this
use Getopt::Std;
- or download this
use strict;
use warnings;
- or download this
use List::Util 'shuffle';
- or download this
getopts('r:n:v', \%opt) or usage();
- or download this
sub usage {
print STDERR "Usage: $0 [-n N] [-r] [-v] command arg1 arg2...
...
-v: verbose mode
";
exit 1;
- or download this
sub USAGE () {
my $name=basename $0; # File::Basename's
...
[actual usage here]
.EOT
}