Welcome to the Monastery | |
PerlMonks |
Re: Testing <>by kennethk (Abbot) |
on Oct 03, 2011 at 15:25 UTC ( [id://929360]=note: print w/replies, xml ) | Need Help?? |
You can detect the presence of waiting input using select, like:
where I have set a 10 millisecond timeout. Might be easier and more portable though to simply pass the filename as argument, and open it yourself. Like many other unix command line tools.
In Section
Seekers of Perl Wisdom
|
|