PerlIO hang bug

Matts on 2004-01-22T22:19:58

Readers of my blog (those that haven't gone elsewhere with my hiatus) will recall I discovered a bug where I could make perl hang doing perlio stuff. Well I now have a minimal test case:

use Encode;
use File::Temp qw(tempfile);

my $fh = tempfile(); print $fh map { pack("H*", $_) } qw(94); seek($fh, 0, 0); binmode($fh, ":encoding(iso-2022-jp)") || die $!; while (<$fh>) { print } # hangs in <$fh>
I'll do up a perlbug when sergeant.org is back in action.