extended patterns (see below), for example to assign a submatch to a
variable.
-The numbered variables ($1, $2, $3, etc.) and the related punctuation
+The numbered match variables ($1, $2, $3, etc.) and the related punctuation
set (C<$+>, C<$&>, C<$`>, C<$'>, and C<$^N>) are all dynamically scoped
until the end of the enclosing block or until the next successful
match, whichever comes first. (See L<perlsyn/"Compound Statements">.)
+B<NOTE>: failed matches in Perl do not reset the match variables,
+which makes easier to write code that tests for a series of more
+specific cases and remembers the best match.
+
B<WARNING>: Once Perl sees that you need one of C<$&>, C<$`>, or
C<$'> anywhere in the program, it has to provide them for every
pattern match. This may substantially slow your program. Perl
# perl4 prints: perl4
# perl5 prints: perl5
+=item * Regular Expression
+
+Unlike in Ruby, failed matches in Perl do not reset the match variables
+($1, $2, ..., C<$`>, ...).
=back