http://qs1969.pair.com?node_id=97156

speedo has asked for the wisdom of the Perl Monks concerning the following question:

here's a piece of code that will print when run by my interpretter and on the web:
foreach $entry (@GILIST) { $seq1 = $gb->get_Seq_by_acc("$entry") || die "$entry is not a real + accession number.\n"; $speciesname = $seq1->species->common_name; $specieslist{$entry} = $speciesname; print p ("Gi# $entry is a $speciesname nucleotide sequence.\n"); }
A slight alteration to this code prevents it from printing to the webpage:
print p ("Gi# $entry is a $specieslist{$entry} nucleotide sequence +.\n");
And this version of the code does not print at all! :
foreach $entry (@GILIST) { $seq1 = $gb->get_Seq_by_acc("$entry") || die "$entry is not a real + accession number.\n"; $speciesname = $seq1->species->common_name; $specieslist{$entry} = $speciesname; } foreach my $entry (sort keys %specieslist) { print p ("GI# $entry is a $specieslist{$entry} nucleotide sequenc +e.\n"); }
And to add insult to injury the following version of my code prints when I run it with the interpretter but not on the web:
foreach $entry (@GILIST) { $seq1 = $gb->get_Seq_by_acc("$entry") || die "$entry is not a real + accession number.\n"; $speciesname = $seq1->species->common_name; unless ($speciesname eq $specieslist{$entry}) { $specieslist{$entry} = $speciesname; print p ("Gi# $entry is a $speciesname nucleotide sequence.\n" +); } }
In this case on the web it will print until the unless loops is "true". So does anyone have the SLIGHTEST INKLING what is happening?!? thanks in advance. . . . -speedo