Task

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



Related task

   Check output device is a terminal


use strict;
use warnings;
use 5.010;
if (-t) {
    say "Input comes from tty.";
}
else {
    say "Input doesn't come from tty.";
}