#!/usr/local/bin/perl -w use strict; use Getopt::Long; use Pod::Text; (my $PROGRAM = (split('/',$0))[-1]) =~ s/\..*$//; my $USAGE = <<__EOT__; Usage: $PROGRAM [-help] __EOT__ my $HELP; # Get the command-line parameters GetOptions("help" => \$HELP) or die($USAGE); if ($HELP) { $^W = 0; # Pod::Text throws warnings pod2text($0); exit(0); } # Continue with the rest of the program # ******************************************************** # * POD documentation # ******************************************************** __END__ =head1 NAME helpme - an example of command-line help =head1 SYNOPSIS helpme [-help] =head1 DESCRIPTION Put your description here! =head1 EXIT STATUS The following exit values are returned: 0 Successful completion -1 An error occurred =head1 AUTHOR INFORMATION Author: Elmer Fudd Address bug reports and comments to: Elmer.Fudd@killthewabbit.com =cut