######################################################################## use strict; use warnings;I have found that all scripts I have written are possible in this environment, and it eliminates many many errors.
######################################################################## # File:gene2seq.pl # executable: gene2seq.pl # Purpose: reads a human list of locus links, translates NM_, then optionally # builds the human upstream sequences into a fasta file # # stderr: errors and status # stdout: selected translated sequence ids or upstream sequences # # Author: David Bernick # History: dlb 5/18/2005 Created # references: external sources of any algorithms or code fragments. ########################################################################
######################################################################## # subroutines # ######################################################################## sub process(); sub writeMatches($\%); sub do_command($); sub min($$); sub max($$); sub isNumeric($);
########################################################################
# Command line options and globals
#
########################################################################
my $upstream = 0;
########################################################################
# parameters
#
########################################################################
my $human2mouseData = "$ENV{'HOME'}/Desktop/orthologs/data/human2mouse.tab";
######################################################################## # subroutine: initialize # # inputs: none # return: none # # purpose: installs all command line options, inits the glorp translator, ..... # uses: global data modifiers if any ########################################################################
######################################################################## # Main # ######################################################################## initialize(); process(); finalize(); exit;
For more ideas about what I like to see in program documentation, see the assignment on documenting programs from my technical writing course.
I recommend the use of POD for documentation of program usage (especially since pod2usage can make the perl program self-documenting), but I'm not as fond of it for internal documentation, as POD seems to be a bit more difficult to maintain than simple comments, so tends not to be properly maintained.