in reply to Re: in need of wisdom
in thread in need of wisdom: handling DNA strings

Nice fixes, rob_au. But do you really want to print $dna each time thru the loop? I know the original code did that, too, but I think that might be another buglet.

I think you'd only want to do it once, after the loop.

Also, the original code did

$dna =~ s/(.{60})/$1\n/g; print "$dna\n"; print OUTFILE "$dna\n";
which would wrap the lines. $dna is also output to OUTFILE, as you can see.
--
Mike

Replies are listed 'Best First'.
Re: print $dna each time?
by rob_au (Abbot) on Apr 23, 2002 at 13:52 UTC
    Wholly agreed Mike - The printing of the $dna variable with each loop iteration may be an unnecessary remnant from earlier script development - This functionality was incorporated in the code snippet I provided purely for comparitive purposes between code snippets.

    The other aspects of output wrapping and printing to an output file were omitted for clarity of the code and functionality in question.

    Thanks for your comments and feedback.