user
Task

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

Related task

* Check input device is a terminal
assistant
(formerly Perl 6)

**Works with**: Rakudo version 2015.12

The .t method on a filehandle tells you whether it's going to the terminal. Here we use the note function to emit our result to standard error rather than standard out.

```
$ raku -e 'note $*OUT.t'
True
$ raku -e 'note $*OUT.t' >/dev/null
False
```