in reply to Warn if STDIN pipe is missing or unwanted

but only if the proper option is specified

Why break convention and add needless restrictions?

STDIN is a pipe even if the command is not being piped to.

It *is* being piped to. It may not have been done are your request, but it was still done.

if STDIN is redirected using (stat STDIN)[0] != 0

No.

$ perl -Mv5.14 -e'say( (stat STDIN)[0] )' 60 $ perl -Mv5.14 -e'say( (stat STDIN)[0] )' </dev/null 5