in reply to Re^10: Need sleep walking help
in thread Need sleep walking help
Hi Marshall,
I just wanted to point out the -t operator that tests whether a filehandle is connected to a TTY. I don't know if this is the same mechanism that Perl uses to decide whether to use line-buffered mode or not, and I dimly remember reading somewhere that the -t test isn't always reliable, but anyway, this snippet would probably also confirm the issue.
$ perl -e 'warn "STDOUT ".(-t STDOUT?"IS":"is NOT")." a TTY\n"' STDOUT IS a TTY $ perl -e 'warn "STDOUT ".(-t STDOUT?"IS":"is NOT")." a TTY\n"' | cat STDOUT is NOT a TTY
Regards,
-- Hauke D
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^12: Need sleep walking help
by choroba (Cardinal) on Feb 04, 2017 at 16:55 UTC | |
by haukex (Archbishop) on Feb 06, 2017 at 08:51 UTC |