I got the following error when one cgi file 'test.cgi' was called from HTML:
 
Can't call method "sequence" on an undefined value 
 
However I can run 'test.cgi' with command 'perl test.cgi' correctly.
 
Can anybody help me figure out the problem?
 
The following is my code: error happened on bold lines.
 
thanks,
 
 
#!/usr/bin/perl
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use warnings;
use diagnostics;
use DNAalign;
use fastream;
use DNAseq;
print "Content-type: text/html\n\n";
print "<html><head><title>Perl CGI Example # 2";
print "</title></head><body><h1>";
print "Alignment Result </h1><p>";
print "<pre>";
chdir("/srv/www/httmp/default/chromat_dir");
my $seq1=fastream->new("default.fasta.screen.contigs");
my $seq2=fastream->new("secondFile");
my $test1=$seq1->next_seq();
my $test2=$seq2->next_seq();
my $s1=$test1->sequence();
my $s2=$test2->sequence();
print "input1===$s1\n";
print "input2===$s2\n";
($sa,$sb)=DNAalign::align($test1,$test1);
$result1=$sa->sequence();
$result2=$sb->sequence();
print "\n";
print "result1=== $result1\n";
print "result2=== $result2\n";
print "</pre>";
print "</p>";
print "</body></html>";



Xiangli Zhang (Justin)
306-310 Decaire Street, Coquitlam
BC, Canada, V3K 6X1
phone: 604-9399181


Xiangli Zhang (Justin)
306-310 Decaire Street, Coquitlam
BC, Canada, V3K 6X1
phone: 604-9399181


---------------------------------
Post your free ad now! Yahoo! Canada Personals

Reply via email to