in reply to Looping failure

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>