develooper Front page | perl.perl5.porters | Postings from November 2011

[perl #7747] <> vs <STDIN> is OS specific

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
November 22, 2011 19:03
Subject:
[perl #7747] <> vs <STDIN> is OS specific
Message ID:
rt-3.6.HEAD-5084-1322017428-324.7747-15-0@perl.org

> 
> I wrote a simple STDIN inline filter that puts a command in
> the path of STDIN.  It sends STDIN to open2, and then takes the
> output of that and dups it back to STDIN.
> 
> When I then read from <> (as opposed to <STDIN>), I get nothing
> on a linux box (tested with 5.005, 5.004, 5.6.0 and 5.6.1), but
> it works fine on other OS (at least Solaris).
> 

I ran the attached program, commenting out first one 'while' loop and
then the other, on both Darwin and Linux, with Perl 5.14.  In all cases,
the program simply hung; none of the 'print' statements ever materialized.

So either I misunderstood what I was supposed to be doing, or the
program still does not work.  Should it have?

Thank you very much.
Jim Keenan

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About