Message-Id: <
20070119221905.D162.BQW10602@nifty.com>
p4raw-id: //depot/perl@29975
STRLEN plen;
SV * const pat = ((SVOP*)expr)->op_sv;
const char *p = SvPV_const(pat, plen);
- if ((o->op_flags & OPf_SPECIAL) && (*p == ' ' && p[1] == '\0')) {
+ if ((o->op_flags & OPf_SPECIAL) && (plen == 1 && *p == ' ')) {
U32 was_readonly = SvREADONLY(pat);
if (was_readonly) {
require './test.pl';
}
-plan tests => 130;
+plan tests => 135;
$FS = ':';
ok(@r3 == 3 && join('-', @r3) eq "-:A:-:B", "$msg - /\\s+/ No.2");
}
}
+
+{
+ my $src = "ABC \0 FOO \0 XYZ";
+ my @s = split(" \0 ", $src);
+ my @r = split(/ \0 /, $src);
+ is(scalar(@s), 3);
+ is($s[0], "ABC");
+ is($s[1], "FOO");
+ is($s[2]," XYZ");
+ is(join(':',@s), join(':',@r));
+}