I receive no errors and in general think you're doing something wrong or not giving me the whole story. While these results are from running on perl 5.6.1 on OpenBSD 3.2 using the default locale (C), I had identical behaviour when I used ActiveState 5.6.1 build 633 on Win2K and Cygwin compiled perl 5.8.0 on Win2K (default locale again). If you are the same person who posted the results from Devel::Peek with the GMG/'g' flag then *that* result is certainly odd given the code snippet.
$ printf "x\0227 " | perl -e 'use utf8; while (<STDIN>) { s/\d //; }'
$ printf "x\0227 " | perl -MDevel::Peek -e 'while (<STDIN>) { Dump($_)
+ }'
SV = PV(0x743c) at 0x7108
REFCNT = 1
FLAGS = (POK,pPOK)
PV = 0x8180 "x\0227 "\0
CUR = 4
LEN = 80
$ printf "x\0227 " | perl fo
>x7 <
SV = PV(0x743c) at 0x7108
REFCNT = 1
FLAGS = (POK,pPOK)
PV = 0x8500 "x\0227 "\0
CUR = 4
LEN = 80
hi
$
|