You seem to have incorporated all the comments except the ones that mattered.
$|=1 for STDOUT in cat.pl is technically not needed in this case because you expect the child to end before you start reading. It's good to have, though.
$|=1 for INPUT in ls.pl is already done by open2. And if it wasn't, it would need to be done in unix too.
Your problem is caused by a bug in IPC::Open3 and by proxy in IPC::Open2.
The chr(0x1a) shouldn't be needed, but it's a workaround for the bug. However, it doesn't work with PerlIO (which is used by ActiveState since 5.8 and probably used by the default on all Perls since 5.8).
By the way, the die "$!" in open2(*OUTPUT,*INPUT,"$^X", "cat.pl") or die "$!"; will never get executed since open2 throws an exception on error. Good thing, cause $! is only appropriate for systems calls and this isn't one.
In reply to Re^3: ActiveState woes : Is it EOF-blind?
by ikegami
in thread ActiveState woes : Is it EOF-blind?
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |