Just a few thoughts...
1. Use strict
2. Use HTML::Template. It really cleans up your code
3. Not sure what you are trying to do here. (See ysth post)
@cut = $newObject->cut_seq($seqobj);

my @tables = (); my $counter = 0; foreach my $fileSeq (@sequences) { # loop through all the sequences my $seqobj = Bio::PrimarySeq->new ( -seq => $fileSeq, -alphabet => ' +dna'); # create an object of the sequence foreach my $element (@enzymes) { # look through all the enzymes for + each sequence my $newEnzyme = new Bio::Tools::RestrictionEnzyme(-NAME => $elemen +t); push @tables,{ COUNTER => $counter++, CUTSEQ => $newEnzyme->site(), ELEMENT => $element, ANNOTATE => $newEnzyme->annotate_seq($seqobj), CUT => $newEnzyme->cut_seq($seqobj), ##### ???? ###### }; } } .. and in .tmpl file <TMPL_LOOP NAME=TABLES> <TABLE BORDER=2> <TR><TD><B>Sequence number <TMPL_VAR NAME=COUNTER></B></TD></TR> <!-- +FIX </tr></td> here --> <TR><TD>The cleavage site is <TMPL_VAR NAME=CUTSEQ> for enzyme <TMPL_V +AR NAME=ELEMENT> denoted by " ^ "<BR></TD></TR> <TR><TD> The annotated sequence is given below along with the digested sequen +ce<BR> <B>Annotated:</B><TMPL_VAR NAME=ANNOTATE><BR> <B>Digested:</B<TMPL_VAR NAME=CUT> </TD></TR> </TABLE><BR><BR> </TMPL_LOOP>

In reply to Re: Looping failure by nedals
in thread Looping failure by MonkPaul

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.