- or download this
#use locale;
use utf8;
$a = 'é';
$a =~ m/\w/ and print "first re match\n";
$a =~ m/[\w]/ and print "second re match\n";
- or download this
first re match
second re match
- or download this
second re match
- or download this
Without locale:
Compiling REx "\w"
...
1: ANYOF{loc}[\w+utf8::IsWord] (13)
13: END (0)
stclass ANYOF{loc}[\w+utf8::IsWord] minlen 1