Why? If feels to me to go against the *NIX principles to worry about something like that. Perhaps this is an X/Y Problem, so if you could explain why you need this that would be useful.
If you need enough rope to shoot yourself in the foot, perhaps there's some trickery you can try like fileno(*ARGV)==fileno(*STDIN) or something, though I don't give any guarantees on that being reliable either. Also see IO::Interactive.
In reply to Re: Warn if STDIN pipe is missing or unwanted
by haukex
in thread Warn if STDIN pipe is missing or unwanted
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |