in reply to Automating the input to exe file

I think this problem can be simplified by thinking about the file as multi-line records. Change your record separator to '>>' and process only the records meeting your threshold. Be sure to include the 'm' at the end of the regex for multi-line matching.

my $threshold = <STDIN>; # or so... my @records; { local $/ = ">>"; while (<FASTA>) { if ( /(\d+\.\d+)% identity/m ) { push @records, $_ if $1 > $threshold; # - or - # process($_); } } } # @records now holds lines meeting threshold # process as needed... # - or - # sub process { ... }

--Solo

--
You said you wanted to be around when I made a mistake; well, this could be it, sweetheart.