in reply to I want to print a limited subsection of certain outputs?

Nevermind all, I figured out a way with a bit more tinkering. I just made variables using substrings that took the first 100 base pairs from both the forward and reverse. The foreach loop is now a for loop that looks like this:

for (my $i = 0; $i < scalar(@mainseq); ++$i) { $rvscomp = reverse $mainseq[$i][1]; $rvscomp =~ tr/ACGT/TGCA/; $fwd100 = substr($mainseq[$i][1],0,100); $rvs100 = substr($rvscomp,0,100); print "$mainseq[$i][0]_forward_first_100\n$fwd100\n$mainseq[$i][0]_rev +ersecomp_first_100\n$rvs100\n"; }