in reply to detect input available from command line
Perhaps the -t test or the PBP-blessed IO::Interactive would help?
The cake is a lie. The cake is a lie. The cake is a lie.