S
superfly2
Hi,
I'm getting the following error, but I don't know why this would happen
given my script.
readline() on unopened filehandle at /bin/apache/cgi-bin/termCompare.pl line
96., referer: http://[host]/biotools/termCompare.shtml
(and one more just like it)
My script is:
use LWP::UserAgent;
use HTTP::Cookies;
use CGI;
use strict;
open(DEBUG, ">/bin/apache/cgi-bin/compareDebug.txt");
# Read in POST data and put in variables
#$CGI:OST_MAX = 512 * 1024; #limit to 512kb upload
my $cgi = new CGI;
my $area1 = $cgi->param('areax');
my $area2 = $cgi->param('areay');
my $file1 = $cgi->param('filex');
my $file2 = $cgi->param('filey');
my $submit_method = $cgi->param('submit');
print DEBUG $file1; #prints filenames correctly
print DEBUG $file2;
my(@list1, @list2);
if($submit_method eq 'Submit Text')
{
$area1 =~ s/\r/\n/g;
$area1 =~ s/;/\n/g;
$area1 =~ s/\t/\n/g;
$area1 =~ s/(\n+)/\n/g;
$area2 =~ s/\r/\n/g;
$area2 =~ s/;/\n/g;
$area2 =~ s/\t/\n/g;
$area2 =~ s/(\n+)/\n/g;
# Now put into arrays the data stuff
@list1 = split(/\n/, $area1);
@list2 = split(/\n/, $area2);
}
else
{
my $term;
while($term = <$file1>) # error refers to this line
{
chomp $term;
print DEBUG "* $term\n";
push @list1, $term;
}
while($term = <$file2>) # error refers to this line
{
chomp $term;
print DEBUG "+ $term\n";
push @list2, $term;
}
}
# if i print list1 or list2, there is nothing in them.
I'm getting the following error, but I don't know why this would happen
given my script.
readline() on unopened filehandle at /bin/apache/cgi-bin/termCompare.pl line
96., referer: http://[host]/biotools/termCompare.shtml
(and one more just like it)
My script is:
use LWP::UserAgent;
use HTTP::Cookies;
use CGI;
use strict;
open(DEBUG, ">/bin/apache/cgi-bin/compareDebug.txt");
# Read in POST data and put in variables
#$CGI:OST_MAX = 512 * 1024; #limit to 512kb upload
my $cgi = new CGI;
my $area1 = $cgi->param('areax');
my $area2 = $cgi->param('areay');
my $file1 = $cgi->param('filex');
my $file2 = $cgi->param('filey');
my $submit_method = $cgi->param('submit');
print DEBUG $file1; #prints filenames correctly
print DEBUG $file2;
my(@list1, @list2);
if($submit_method eq 'Submit Text')
{
$area1 =~ s/\r/\n/g;
$area1 =~ s/;/\n/g;
$area1 =~ s/\t/\n/g;
$area1 =~ s/(\n+)/\n/g;
$area2 =~ s/\r/\n/g;
$area2 =~ s/;/\n/g;
$area2 =~ s/\t/\n/g;
$area2 =~ s/(\n+)/\n/g;
# Now put into arrays the data stuff
@list1 = split(/\n/, $area1);
@list2 = split(/\n/, $area2);
}
else
{
my $term;
while($term = <$file1>) # error refers to this line
{
chomp $term;
print DEBUG "* $term\n";
push @list1, $term;
}
while($term = <$file2>) # error refers to this line
{
chomp $term;
print DEBUG "+ $term\n";
push @list2, $term;
}
}
# if i print list1 or list2, there is nothing in them.