in reply to Re: ActiveState woes : Is it EOF-blind?
in thread ActiveState woes : Is it EOF-blind?
and# This is cat.pl $|=1; while(<>) { print; } chr(0x1a) if $^O eq 'MSWin32';
Still, using the programs on Windows like this:# This is ls.pl use strict; use warnings; use IPC::Open2; # OUTPUT: Filehandle for output from cat.pl # INPUT: Filehandle for input to cat.pl open2(*OUTPUT,*INPUT,"$^X", "cat.pl") or die "$!"; print INPUT "first line\nsecond line\n"; if ($^O eq 'MSWin32') { select INPUT; $| = 1; print INPUT chr(0x1a); } close INPUT; my @result=<OUTPUT>; close OUTPUT; print "RESULT:\n@result\n";
causes it to hang.perl ls.pl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: ActiveState woes : Is it EOF-blind?
by ikegami (Patriarch) on May 06, 2008 at 12:09 UTC | |
by rovf (Priest) on May 06, 2008 at 13:30 UTC |