#!/usr/bin/perl use strict; use warnings; use Getopt::Long; use Pod::Usage; my $help; GetOptions( "help" => \$help ) or pod2usage( -input => \*DATA ); pod2usage( -message => "help------------------------\n", -exitval => 0, -verbose => 2 ); __DATA__ =head1 NAME yourscript.pl =head1 SYNOPSIS Print help message and manual =head1 OPTIONS =over =item B<--help> Prints a brief help message =item B<--man> Prints man =cut