Mass Deface
. C<\N{BEL}>
means U+0007, with no warning given. The character at U+1F514 has no
name in 5.14, but can be referred to by C<\N{U+1F514}>.
In Perl 5.16, C<\N{BELL}> will refer to U+1F514; all code
that uses C<\N{BELL}> should be converted to use C<\N{ALERT}>,
C<\N{BEL}>, or C<"\a"> before upgrading.
=head3 Full functionality for C modifiers
Four new regular expression modifiers have been added. These are mutually
exclusive: one only can be turned on at a time.
=over
=item *
The C modifier says to compile the regular expression as if it were
in the scope of C, even if it is not.
=item *
The C modifier says to compile the regular expression as if it were
in the scope of a C pragma.
=item *
The C (default) modifier is used to override any C and
C pragmas in effect at the time
of compiling the regular expression.
=item *
The C regular expression modifier restricts C<\s>, C<\d> and C<\w> and
the POSIX (C<[[:posix:]]>) character classes to the ASCII range. Their
complements and C<\b> and C<\B> are correspondingly
affected. Otherwise, C behaves like the C modifier, in that
case-insensitive matching uses Unicode semantics.
If the C modifier is repeated, then additionally in case-insensitive
matching, no ASCII character can match a non-ASCII character.
For example,
"k" =~ /\N{KELVIN SIGN}/ai
"\xDF" =~ /ss/ai
match but
"k" =~ /\N{KELVIN SIGN}/aai
"\xDF" =~ /ss/aai
do not match.
=back
See L for more detail.
=head3 Non-destructive substitution
The substitution (C) and transliteration
(C) operators now support an C option that
copies the input variable, carries out the substitution on
the copy, and returns the result. The original remains unmodified.
my $old = "cat";
my $new = $old =~ s/cat/dog/r;
# $old is "cat" and $new is "dog"
This is particularly useful with C