#!/usr/local/bin/perl5 -w

  use strict;       # Check our syntax strictly
  use diagnostics;  # Tell us how to fix mistakes
  use CGI;          # Import the CGI module
  use CGI::Carp;

  # Create an instance of CGI
  my $query = new CGI;


sub log_and_die
  {
  	# Get arguments
	my $string = shift;

	# Begin the HTML
	print $query->start_html(-title => "Error");

	# Give a message
	print "<P>Sorry, but this program has";
	print "encountered an error. The system ";
	print "administrator has been ";
	print "informed</P>\n";

	print "<P>Would you like to return to the ";
	print "<a href=\"/\">home page</a>?\n";

	# End the HTML
	print $query->end_html();

  # Now die with the error message
  die $string;
}
