Just another Perl shrine | |
PerlMonks |
Re: How to clear named pipe to just have one lineby moritz (Cardinal) |
on Feb 08, 2014 at 13:13 UTC ( [id://1073998]=note: print w/replies, xml ) | Need Help?? |
I don't think it's possible; if you read from a (named) pipe, its content is gone. So you can't read to check how much is in there. Usually you don't need it either, since named pipes are buffered, and once the buffer is full, writing to it blocks. And, more to the point, you shouldn't even care how much is in the pipe; pipes are there to abstract that away. What problem are you actually trying to solve? It could be an XY Problem.
In Section
Seekers of Perl Wisdom
|
|