Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

RE: Re: How to preserve the value of STDIN

by Fastolfe (Vicar)
on Sep 22, 2000 at 03:10 UTC ( #33586=note: print w/ replies, xml ) Need Help??

in reply to Re: How to preserve the value of STDIN
in thread How to preserve the value of STDIN

This is still only a one-shot deal. <STDIN> now immediately returns an EOF (since we're reading from /dev/null now) as will any subsequent read from <NEWIN> (since we've read everything from what was once STDIN). We're not gaining anything here, in other words. He needs his in-house stuff to parse STDIN *as well* as Both of them are written to read from STDIN, and only the first will succeed.

If this were a normal file handle, we could seek(STDIN, 0, 0) to return it to a sane, starting state, but you can't do this with STDIN, because it's actually more like a pipe than a file.

Comment on RE: Re: How to preserve the value of STDIN
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://33586]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2015-11-25 17:33 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (683 votes), past polls