#!/usr/bin/perl -w # # Retrieve form selections & display the results # use strict; use File::Find; use CGI; my $q = new CGI; my $request = $ENV{"Query String"}; # Assign input to variables my $start_month= $q->param('month'); my $start_day= $q->param('day'); my $start_year= $q->param('year'); my $start_hour= $q->param('hour'); my $start_min= $q->param('min'); my $test_site= $q->param('center'); my $string="0"; print $q->header("text/html\n\n"), $q->start_html(-title=>"Data Report"), "Report for $test_site from $start_hour:$start_min $start_month/$start_day/$start_year.\n"; #Find the file (yymmdd_site format) undef$/; find (sub { return if($_ =~ /^\./); return unless($_ =~ /\.txt/i); stat $Find::File::name; return if -d; return unless -r; open(FILE, "<$Find::file::name") or return; $string = ; close(FILE); return unless($string =~ /\$start_year$start_month$start_day$test_site\E/i); print $string; }, '/(name of my directory tree) $q->end_html;