It's even weirder than that. Given:
$\ = "\n";
my $x = "X-Xoqp-SDR-FpCqar4-Duooery-Faad-laeC_cCesspfpads:";
print $x =~ /^[^\x00-\x1f\x7f-\xff :]+:/ || 0;
print $x =~ /^[^\x00-\x1f\x7f-\xff :]+:/i || 0;
utf8::upgrade($x);
print $x =~ /^[^\x00-\x1f\x7f-\xff :]+:/ || 0;
print $x =~ /^[^\x00-\x1f\x7f-\xff :]+:/i || 0;
Here are the results:
% perl5.12.3 /tmp/bl
1
1
1
1
% perl5.12.3 -M5.012 /tmp/bl
1
1
1
1
% blead /tmp/bl
1
1
1
0
% blead -M5.012 /tmp/bl
1
0
1
0
So with (full) Unicode strings, it's yet again different still.
With apologies to Philip K Dick :), this is a Karl-Thing, I think.
--tom
Thread Previous
|
Thread Next