in reply to How do I find out if STDIN or STDOUT are attached to a pipe?

if (-t) { # STDIN is attached to a terminal # that is, we're running interactively ... }

-- Randal L. Schwartz, Perl hacker

  • Comment on •Re: How do I find out if STDIN or STDOUT are attached to a pipe?
  • Download Code