#! /usr/bin/perl -w my $switch=0; while(){ if ($_=~m/pep/){ $switch=1; } if ($_=~/pep/){ print ">$ARGV[0].$ARGV[1].genewise\n"; next; } if (($switch==1)&&($_!~/\//)){ print $_; } if ($_=~/\//){ $switch=0; } }