Task

Demonstrate how to check whether the output device is a terminal or not.



Related task

   Check input device is a terminal


$ perl -e "warn -t STDOUT ? 'Terminal' : 'Other'"
Terminal
$ perl -e "warn -t STDOUT ? 'Terminal' : 'Other'" > x.tmp
Other
 