c:\@Work\Perl>perl -wMstrict -le "my $s = qq{xxx \@B grab \n this \@E yy zzzz}; print qq{[[$s]]}; ;; my @captures = $s =~ m{ \@B (.*?) \@E }xmsg; print qq{<<$_>>} for @captures; " [[xxx @B grab this @E yy zzzz]] << grab this >>