# File named "my-script-name.pl" to match Pod. use strict; use warnings; use Getopt::Long; use Pod::Usage; my $ok = GetOptions( help => \my $help, task => \my $do_something ); pod2usage( -verbose => 0 ) unless $ok; pod2usage( -verbose => 2 ) if $help; print "Doing... ", $do_something ? "something or other\n" : "NOTHING!\n"; __DATA__ =head1 Synopsis my-script-name.pl -help my-script-name.pl -task =head1 License WTFPL (NSFW!). =cut