#! /usr/local/bin/perl # File Dumper: Student version # # Begin loading the needed extensions # use CGI qw (:html2); # The CGI extension use CGI::Carp qw (carpout); # The extra carping routine # # The file dbtype.pl sets a variable which determines the type of database # you will use. This file will be found in either /tmp or /temp. # use lib qw(/tmp /temp); require 'dbtype.pl'; # # Set the path, unbuffer STDOUT, and redirect errors to the browser # $ENV{PATH} = join ":", qw(/usr/bin /bin /sbin /usr/sbin /etc); $| = 1; carpout(\*STDOUT); # # Declare variables # my( $q, $fname, $line ); # # Accept the CGI request # $q = new CGI; # # Read values from the form which called us # $fname = $q->param("file_name"); # # Send the HTTP header # print $q->header; # # Set the