Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Using stdin only if there is input on it, but skipping it if there is no data

by perlfan (Vicar)
on Nov 18, 2020 at 19:41 UTC ( [id://11123789]=note: print w/replies, xml ) Need Help??


in reply to Using stdin only if there is input on it, but skipping it if there is no data

In the past I have used a combination of a timeout and a black that the user sets to explicitly say, "look for STDIN", sort of like some *nix utilities use the lone "dash" (-) (e.g., tar, etc). Also I found this solution (stackexchange) that is not my solution but demonstrates using a time out with the read.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-19 22:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found