jeremyh has asked for the wisdom of the Perl Monks concerning the following question:
High-level goal - I would like to read the contents of stdin, and then put them back for another process to read.
I've been looking at saving the contents in a scalar and then closing and reopening stdin for output, writing the contents to it, then closing and reopening it for reading, but I can't get this to work.
I expect there's a way to do it with something lower level for the read (like in C), but I was hoping it could be done at the high level.
Thanks for your input..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: non-destructive read on stdin
by ikegami (Patriarch) on Aug 01, 2006 at 23:03 UTC | |
by jeremyh (Beadle) on Aug 01, 2006 at 23:29 UTC | |
|
Re: non-destructive read on stdin
by rodion (Chaplain) on Aug 01, 2006 at 23:21 UTC | |
by betterworld (Curate) on Aug 02, 2006 at 01:41 UTC |