#!/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 search, 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); } }