# Setup up # Variables # and define work fields # If file exists, append to it if (-e $datefile) { open (BOBIN, ">>$datefile") || die "Cannot Open File $datefile for writing: $!"; # Open Data file } else { ### Else open directory where files data files are located # Sort in descending order, pick out first file # And e-mail it # Then create a new file with current data as name open (BOBIN, ">$datefile") || die "Cannot create File $datefile for writing: $!"; } # The param function to see if a button was clicked # If not, go on if (!(param())) { # Do stuff # By processing data # put up web page # with formatted data
} else { # When it is print # Redirect to another web page if (param('S1') eq "Send") { print BOBIN $datajoin; use CGI; print redirect("http://www.gailborden.info/services/bob/submitq.htm");} } close(BOBIN);