#!/usr/bin/perl use Getopt::Long; use Pod::Usage; # Parameters our $foo = ''; our $redirect = ''; our $nooutput = ''; INIT { my $help = ''; GetOptions( 'help|?' => \$help, 'foo=s' => \$foo, 'redirect' => \$redirect, 'nooutput' => \$nooutput, ) or pod2usage(2); pod2usage(-exitstatus => 0, -verbose => 2) if $help; } print "Hello World\n"; print "Files are " . join(',', @ARGV) . "\n"; 1; __END__ =head1 NAME yourscript.pl - This is what I DO =head1 SYNOPSIS ./yourscript.pl =head1 DESCRIPTION I'm a description. --foo I take a string --redirect I'm a trigger --nooutput I'm a trigger too --help This help text =head1 AUTHOR Written by you