in reply to matching lines in multi-line string

Slurping a filehandle into scalar can be very memory intensive, but for those times when slurping is a good solution, be sure to preserve the value of $/ so that you don't clobber other filehandle reads in the rest of your program. Here is a "safer" way to slurp:
my $lines = do {local $/; <FILE>};
Read this for more info.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)