Help for this page

Select Code to Download


  1. or download this
    use open qw/:locale/;
    
    ...
    
    print "Outside char class: ", $s =~ m/\w/   ? "" : "no ", "match\n";
    print "Inside char class:  ", $s =~ m/[\w]/ ? "" : "no ", "match\n";
    
  2. or download this
    $ perl -e'binmode STDOUT, ":encoding(UTF-8)"; print chr 0xC9' | LANG=e
    +n_CA.utf8 perl a.pl 0
    unix:perlio:utf8
    ...
    Input = "\x{c9}" [utf8]
    Outside char class: no match
    Inside char class:  match