#!/usr/local//bin/perl #+JMJ # template.pl - Perl script template (command line) # Copyright 201x David Meyer. All rights reserved. # template.pl is part of template # Identification #################################################### $PROGRAM = 'template' ; $VERSION = '0.0' ; $SRCFILE = 'template.pl' ; $COPYRIGHT = 'Copyright 201x David Meyer' ; $DESCRIPTION = 'Perl script template (command line)' ; $USAGE = "Usage: template [<options>] [<argument> ...]" ; $CONTACT = 'David Meyer <papa@sdf.org>' ; # Initialize environment ############################################ unset IFS PATH=/bin:/usr/bin # Arguments ######################################################### while getopts Vh option; do case $option in V ) echo "$PROGRAM $VERSION" echo $COPYRIGHT exit 0 ;; h ) cat << ENDHELP $USAGE $DESCRIPTION Options are as follows: ... -V Display version number -h Display this help message Report bugs to $CONTACT. ENDHELP exit 0 ;; * ) echo $USAGE >&2 exit 1 ;; esac done shift $(( $OPTIND-1 )) # Functions ######################################################### # Main driver ####################################################### exit 0