open (UNI, "lipoP63.swiss") or die ("Could not open swiss file"); while ()#\s \S { if ($_=~m/^ID {3}(\S+) /) { #print "$1\n"; $id=$1; } if ($_=~/^FT SIGNAL +1 +(\d\d)[ \n]/) { #print "$_"; $sl=$1; } if ($_=~/^ {5}(.*)/) { $s.=$1; $s=~s/ //g; $s=~s/\n//g; } if ($_=~/^\/\/\n/) { print "$id $sl "; if($s=~/(.*LA[GA])C/) { print "lipoprotein "; $cleavage=length($1); print "$cleavage"; } print "\n"; $s=''; } }