On Sun, Dec 17, 2000 at 11:27:32AM -0600, Jarkko Hietaniemi wrote: > Thanks, I need all the possible speedups I can find to pay for my > regex polymorphism patch :-) Does this mean that the utf leakage detector might soon report OK on test 1? And that PerlIO will fix test 3? #!/usr/bin/perl -w use strict; my $input = chr 340; printf "# Input has length %d \n", length $input; my $output = $input; $output =~ s/././; if (length ($output) == 1) { print "ok 1\n"; } else { printf "not ok 1 # length is %d\n", length $output; } my $key = $input; my %hash = ($key, 1); ($key) = keys %hash; if (length ($key) == 1) { print "ok 2\n"; } else { printf "not ok 2 # length is %d\n", length $key; } my $pid = open SPROG, "|-"; die $! unless defined $pid; if ($pid) { # Parent print SPROG $input; } else { # Child undef $/; $input = <STDIN>; if (length ($input) == 1) { print "ok 3\n"; } else { printf "not ok 3 # length is %d\n", length $input; } exit 0; # really should be _exit } /usr/bin/perl5.004 ~/test/spot_utf.pl # Input has length 1 ok 1 ok 2 ok 3 /usr/bin/perl5.6.0 ~/test/spot_utf.pl # Input has length 1 not ok 1 # length is 2 not ok 2 # length is 2 not ok 3 # length is 2 /usr/local/bin/perl5.7.0 ~/test/spot_utf.pl # Input has length 1 not ok 1 # length is 2 not ok 2 # length is 2 not ok 3 # length is 2 ./perl ~/test/spot_utf.pl # Input has length 1 not ok 1 # length is 2 ok 2 Wide character in print at /home/nick/test/spot_utf.pl line 28. not ok 3 # length is 0 Nicholas ClarkThread Previous | Thread Next