#!/usr/local/bin/perl # Script: addFooter.cgi $HOME=$ENV{'HOME'}; $ServerRoot = $HOME . "/server"; $DocumentRoot = $ENV{'DOCUMENT_ROOT'}; $foot_path=$DocumentRoot . "/footer/footer.txt"; $var="PATH_INFO"; $path_data=$ENV{$var}; if ($path_data) { is_path(); } else { no_path(); } sub no_path() { print < PATH_INFO

No file was sent to the script

END ; } sub is_path() { $tran_path=$ENV{'PATH_TRANSLATED'}; print <) { if (m|(.*)(.*)|i) { print $1; while ($foot = ) { print $foot; } print $2; } else { print; } } close FILE; } sub print_env() { print "
\n";
    foreach (keys %ENV) {
	print "$_\t$ENV{$_}\n";
    }
    print "
\n"; }