#!/usr/bin/perl -w

@fileliste = glob("*.trim");
foreach $filename (@fileliste) {
	$count=0;
	open(akfile,$filename);
	while(defined($i=<akfile>)){
			if($i=~/1\./){
			$count=$count+length($i)-8;
			}#if 1.
		}#while
	print $filename." Laenge: ".$count."\n";
	if($count>120){
		if((system "rnazWindow.pl --no-reference $filename | RNAz --both-strands --predict-strand --show-gaps  > $filename.rnaz")==0){
		}else{
			print "Fehler SOLVED\n";
			system "RNAz --both-strands --predict-strand --show-gaps $filename > $filename.rnaz"
			};
	}
	else{
		system "RNAz --both-strands --predict-strand --show-gaps $filename > $filename.rnaz";

		}
}#foreach
