How do I find out if I'm running interactively or not? Good question. Sometimes -t STDIN and -t STDOUT can give clues, sometimes not. if (-t STDIN && -t STDOUT) { print "Now what? "; }