#! perl -w
use strict;
# 1: no problem (even on Win32)
#
my $root = 'C:/perl';
my $podfile = 'C:/Perl/lib/Config.pm';
print "$podfile $root $1 $2\n" if $podfile =~ m!$root/(.*)/(\w+)\.p.+$!i;
# 2: causes error
#
my $rootb = 'C:\perl';
my $podfileb = 'C:\Perl\lib\Config.pm';
print "$podfileb $rootb $1 $2\n" if $podfileb =~ m!$rootb/(.*)/(\w+)\.p.+$!i;
# 3: simplified, causes error
#
print "yo\n" if 'perl' =~ m|\perl|;
__END__
####
In addition, Perl defines the following:
...
\pP Match P, named property. Use \p{Prop} for longer names.
\PP Match non-P
####
print "==$Config{installprefix}==\n"; # prints ==C:\Perl==
####
$podfileb =~ s!\\!/!g;
$rootb =~ s!\\!/!g;