henzcoop has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks, The code below is within a loop structure. I'm trying to figure out why it prints all lines of output to my screen, but only the last line of output to the OUT file. Thanks for your input.
{ print "pos $i $testseq\n"; open OUT, ">results5"; print OUT "pos $i $testseq\n"; close OUT; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: output file gives only last line
by GrandFather (Saint) on Jun 09, 2015 at 02:03 UTC | |
|
Re: output file gives only last line
by jeffa (Bishop) on Jun 08, 2015 at 23:36 UTC | |
|
Re: output file gives only last line
by sandy105 (Scribe) on Jun 09, 2015 at 10:58 UTC | |
|
Re: output file gives only last line
by henzcoop (Novice) on Jun 09, 2015 at 19:23 UTC |