Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
January 31, 2005, 5:05 pm
rate this thread
be "use"ed by other scripts. These other scripts may be useing other
lib's which want to read from STDIN as well.
So I've written this code which works great for re-populating STDIN
except for when I try to print binary to the handle.
my $input = join('', <STDIN>);
print TOSTDIN $input;
in the senario where I get an image file submited via the web, it hangs
when tring to "print TOSTDIN $input;".
Re: Perl "pipe" command, cant print binary to handle
> pipe(STDIN, TOSTDIN);
> print TOSTDIN $input;
> it hangs when tring to "print TOSTDIN $input;".
A pipe is a pipe not a storage medium. You can only put so much in
before you have to wait for somthing to start taking stuff out the
You probably wanted:
open STDIN, '<', $input;
- » FAQ 5.29 How can I tell whether there's a character waiting on a filehandle?
- — Previous thread in » PERL Discussions