#!/usr/bin/env perl use warnings; @proteins=qw(DAAAAATTLTTTAMTTTTTTCKMMFRPPPPPGGGGGGGGGGGG ALTAMCMNVWEITYHKGSDVNRRASFAQPPPQPPPPLLAIKPASDASD); for $protein (@proteins) { if ($protein =~ m/(KR)!P/g) { $protein =~ s/(KR)/$1=/; @new_peptides = split ('=',$protein); } } for (@new_peptides) { print "The peptide is $new_peptides\n"; }