$B .= "$1\n" unless $1 =~ /def/; #### $B .= "$1\n" if $match =~ /def/; #### while ($A =~ m{(.+)}g) { my $capture = $1; $B .= "$capture\n" if $capture =~ /def/; }
## $B .= "$1\n" if $match =~ /def/; ##
## while ($A =~ m{(.+)}g) { my $capture = $1; $B .= "$capture\n" if $capture =~ /def/; }