Hope you don't mind, but I'm going to critique your code
#!/usr/bin/perl # This line looks ok
# name of output file
$output = 'outputfile.txt';
#loads CGI module
use CGI;
# if you do this:
use CGI qw

standard);
# instead, it will load the CGI routines into the standard namespace, so you can jsut use "param" instead of "CGI:

aram"
if (CGI:: param('name1') eq'')
# this does the same thing, but is shorter: unless (param('name1'))
{
$name = CGI:: param('name2');
}
else
{
$name = CGI:: param('name1');
}
$Found = 0;
# Opens the file for input, or dies if it can't open the file.
open(IN, $output)
|| die ("can't open $output");
# When opening files for input, you should precede the filename with "<" which indicates your opening files read only.
#assign data to an array
@raw_data=<IN>;
close(IN);
# Assigning an entire file to an array this way in generally considered bad practice, because you might have a very large file,
# and if you load the whole thing into memory at once, it takes up a lot of memory. However, there are some cases where you
# really don't have much of a choice.
print "Content-type: text/html\n\n"; # if you use the qw

standard) thing I added up at the top, then you can jsut do "print header" as
# there's a header function in the CGI module.
print "<HTML><BODY>";
# If you want two line breaks, do this: \n\n
# \n followed by an actual carriage return gets really messy looking.
foreach $Line (@raw_data)
{
if ($Line ne "\n")
{
# The whole commented out block can be replaced with this:
if ($Line =~ m/^$name,/) {
$Found =1;
$Line =~ s/^($name),/<b>$1<\/b>/;
print "$Line\n";
}
# (@Team)=split(/\,/,$Line);
# if ($name eq $Team[1])
# {
# $Found = 1;
# for($count=0;$count<20;$count++)
# {
# if ($count eq 0)
# {
# print "<b>$Team[$count]</b>";
# }
# else
# {
# print "$Team[$count]\n"; }
# }
# print "\n";
# }
}
}
if ($Found eq 0)
# I'd do this instead:
unless ($Found)
{
print "Name Not Found";
}
print "</BODY></HTML>";
# I think that's all correct.
