my @peptides = # 4. and the pieces are peptides. map split($cleave), # 3. split at each cleavage point... grep m{ $cleave }xms, # 2. that can be cleaved, ... @proteins # 1. for each protein... ;