in reply to Bioinformatics: Regex loop, no output

#!/usr/bin/perl # http://perlmonks.org/?node_id=1147731 use strict; use warnings; my @new_peptides; my @proteins=qw( DAAAAATTLTTTAMTTTTTTCKMMFRPPPPPGGGGGGGGGGGG ALTAMCMNVWEITYHKGSDVNRRASFAQPPPQPPPPLLAIKPASDASD ); for my $protein (@proteins) { if ($protein =~ m/[KR](?!P)/) { $protein =~ s/[KR]\K(?!P)/=/g; push @new_peptides, split ('=',$protein); } } for (@new_peptides) { print "The peptide is $_\n"; }