I wanted to open a document and have it return to me the last number in a row containing '>'
as a reference. That of all rows that have this '>'
.
or that it read the amount of '>'
that existed in the file and returned it in the form that I could put each number of it (1, 2, 3 ..) into a variable.
The data appears this way:
'>' VE05.fasta.screen.Contig1 TTTTGTTTTTTTTTTTTTTTTTTTTATTTAATTTTTTTCTTTGGGGGGGG GGAAAATTTTTTTTTCCCTCCCTTCTACAACACAAGAAAAAAAAACTTCC '>' VE05.fasta.screen.Contig2 TTTTGTTTTTTTTTTTTTTTTTTTTATTTAATTTTTTTCTTTGGGGGGGG GGAAAATTTTTTTTTCCCTCCCTTCTACAACACAA
I made this code, but I know it is incomplete.
open (my @number, '<', @n);
@number = chop ();
print "Contig's final number:@num";
close @n;