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
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.