Check input device is a terminal: Difference between revisions

Content deleted Content added
Omitted languages: add Processing
Thundergnat (talk | contribs)
Rename Perl 6 -> Raku, alphabetize, minor clean-up
Line 220:
Input comes from tty.
$ true | perl istty.pl
Input doesn't come from tty.
 
=={{header|Perl 6}}==
{{works with|Rakudo|2015.12}}
<lang perl6>say $*IN.t ?? "Input comes from tty." !! "Input doesn't come from tty.";</lang>
 
$ perl6 istty.p6
Input comes from tty.
$ true | perl6 istty.p6
Input doesn't come from tty.
 
Line 262 ⟶ 253:
(terminal-port? (current-input-port))
</lang>
 
=={{header|Perl 6Raku}}==
(formerly Perl 6)
{{works with|Rakudo|2015.12}}
<lang perl6>say $*IN.t ?? "Input comes from tty." !! "Input doesn't come from tty.";</lang>
 
$ perl6 istty.p6
Input comes from tty.
$ true | perl6 istty.p6
Input doesn't come from tty.
 
=={{header|REXX}}==