Ok I got it working I would like to change up a little of what I am doing, Instead of how if is currently printing the data I would like to to print it into a table Something that looks liek this
0:00 1:00 2:00 3:00 ... 23:00
aug 1 data from text files here
aug 2 data from text files here
aug 3 data from text files here
aug 4 data from text files here
again here is my current code
#!/usr/bin/perl
use strict;
use warnings;
use CGI ':standard';
print header,
start_html('Player Point Tracker'),
h1('W51 Point Tracker'),
start_form,
body('The website is also case sensitive and may take awhile to se
+arch, It will be looking though alot of data.'), p,
'Players Name: ',
textfield('name'), br,
submit('Search!'),
end_form, p,
hr;
my $search_term =param('name');
print "$search_term", p;
for my $digit (0 .. 9) {
for my $file (<$digit*>) {
open (my $FILE_HANDLE, '<', $file) || die "Can't open $file: $
+! \n";
while (<$FILE_HANDLE>) {
chomp;
my ($word, $count) = split / /, $_;
if ($word =~ /^$search_term$/) {
print "At $file $word had $count points.", p;
#print "$file";
}
}
close ($FILE_HANDLE);
}
}
|