#!/usr/bin/perl # define script defaults (change these to suit your needs or supply them in your script calls) my %defaults = ( foo => "bar", bar => "foo", ... => ..., ); # to handle parameter passing use CGI; # get the script parameters; 1st from the ARGV array (in the case of SSI calls) then the QUERY_STRING if (@ARGV) { $input = new CGI ( join "&" => @ARGV ); } else { $input = new CGI; } # set the values for parameters omitted by user to the %defaults values for ( keys %defaults ) { $input->param(-name=>$_,-value=>$defaults{$_}) unless $input->param($_); } ######### # the rest of your program here #########